Here's a patch which implements 'file link source ?
target?'. It is fully implemented on Unix, and on
Win/MacOS, it simply returns standard error
messages (like 'file readlink' on Windows at
present). It would be easy to add a MacOS
implementation, and a WinNT version is apparently
possible (search on comp.lang.tcl for 'file link').
Obviously this would need a TIP, but it is a very
minor change (the patch is v. small!).
No 'VFS' modifications are required at all -- this
fits into the pre-existing framework.
Any thoughts?
Logged In: YES
user_id=32170
deleted old patch.
Logged In: YES
user_id=32170
Uploading new patch. Contains implementation for
Windows. This needs the very latest cvs head (with
improved handling of windows native paths).
Logged In: YES
user_id=32170
Attached patch with some docs and tests and to allow
file linking of directories and files on Windows.
Logged In: YES
user_id=32170
Yet another patch -- handles some annoying Windows /
\ problems.
Logged In: YES
user_id=7549
I like it. I haven't tried it, but I do like it. In file.n you
say "systems that don't support it". You might add some
detail and say only (XP?) and 2K support this. I do like the
way you test for the existence of the function pointer in
tclWinProcs rather than an OS version test as it'll be more
accurate. Say another service pack for ME somehow adds it
in, Tcl gets it.
If possible, you might be able to move the PlatSdk defines
from tclWinInt.h to just tclWinCmd.c as it isn't shared. Or is
it? I should apply this and offer some substance to my
opinions :)
Logged In: YES
user_id=32170
Unfortunately, (at least some of) those defines are
shared between tclWinFile.c and tclWinFCmd.c...
However, it is a good idea, so I've added some helper
functions and now only one define is actually needed in
winInt.
Attached latest patch. This allows 'file delete' and 'file
copy' to work correctly on links (i.e. as defined by the
man page).
Is it worth putting in a TIP to get this into 8.4?
Logged In: YES
user_id=32170
Better docs, tests, comments in code. Tests also check
type of drive to ensure links are supported on Windows.
Note: patch doesn't include support for MacOS yet, but
that should be easy to add.
Logged In: YES
user_id=32170
Added 'file normalize' handling of symlinks on
Windows. Tcl now has complete handling of symlinks
on Windows.
Logged In: YES
user_id=79902
Cross-ref: http://purl.org/tcl/tip/99
Logged In: YES
user_id=32170
renamed, and added new patch to latest cvs head.
Logged In: YES
user_id=32170
Added patch to latest cvs head.
Logged In: YES
user_id=32170
Added more tests.
Logged In: YES
user_id=32170
Added complete documentation and further tests.
Logged In: YES
user_id=32170
Made some more tests which were 'unixOnly' work
cross-platform. I think this is a suitable final version of
the patch for TIP 99.
Logged In: YES
user_id=32170
Added some more tests, and improved performance of
file normalization in presence of links on Windows.
Also enhanced the documentation.
diff -bu with windows eols against current cvs head
Logged In: YES
user_id=32170
Patch applied to cvs head.