Share

Tcl

Tracker: Patches

5 TIP99, a 'file link source ?target?' impl. - ID: 562970
Last Update: Comment added ( vincentdarley )

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?


Vince Darley ( vincentdarley ) - 2002-05-31 16:23

5

Closed

Accepted

Vince Darley

37. File System

None

Public


Comments ( 16 )

Date: 2002-06-21 14:38
Sender: vincentdarley

Logged In: YES
user_id=32170

Patch applied to cvs head.



Date: 2002-06-18 10:32
Sender: vincentdarley

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.



Date: 2002-06-14 14:20
Sender: vincentdarley

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.




Date: 2002-06-14 11:19
Sender: vincentdarley

Logged In: YES
user_id=32170

Added complete documentation and further tests.



Date: 2002-06-13 15:47
Sender: vincentdarley

Logged In: YES
user_id=32170

Added more tests.


Date: 2002-06-13 15:33
Sender: vincentdarley

Logged In: YES
user_id=32170

Added patch to latest cvs head.



Date: 2002-06-12 09:40
Sender: vincentdarley

Logged In: YES
user_id=32170

renamed, and added new patch to latest cvs head.


Date: 2002-06-12 08:06
Sender: dkfProject Admin

Logged In: YES
user_id=79902

Cross-ref: http://purl.org/tcl/tip/99


Date: 2002-06-11 18:01
Sender: vincentdarley

Logged In: YES
user_id=32170

Added 'file normalize' handling of symlinks on
Windows. Tcl now has complete handling of symlinks
on Windows.


Date: 2002-06-11 10:46
Sender: vincentdarley

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.


Date: 2002-06-11 09:07
Sender: vincentdarley

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?


Date: 2002-06-10 22:00
Sender: davygrvy

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 :)


Date: 2002-06-10 19:02
Sender: vincentdarley

Logged In: YES
user_id=32170

Yet another patch -- handles some annoying Windows /
\ problems.


Date: 2002-06-10 12:56
Sender: vincentdarley

Logged In: YES
user_id=32170

Attached patch with some docs and tests and to allow
file linking of directories and files on Windows.



Date: 2002-06-10 10:44
Sender: vincentdarley

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).




Date: 2002-06-10 10:43
Sender: vincentdarley

Logged In: YES
user_id=32170

deleted old patch.


Attached File ( 1 )

Filename Description Download
tip99.patch diff -bu with windows eols against current cvs head Download

Changes ( 30 )

Field Old Value Date By
assigned_to dkf 2002-06-21 14:38 vincentdarley
resolution_id None 2002-06-21 14:38 vincentdarley
status_id Open 2002-06-21 14:38 vincentdarley
close_date - 2002-06-21 14:38 vincentdarley
File Deleted 25108: 2002-06-18 10:32 vincentdarley
File Added 25311: tip99.patch 2002-06-18 10:32 vincentdarley
File Deleted 25098: 2002-06-14 14:20 vincentdarley
File Added 25108: tip99.patch 2002-06-14 14:20 vincentdarley
File Added 25098: tip99.patch 2002-06-14 11:19 vincentdarley
File Deleted 25044: 2002-06-14 11:19 vincentdarley
File Added 25044: tip99.patch 2002-06-13 15:47 vincentdarley
File Deleted 25042: 2002-06-13 15:47 vincentdarley
File Added 25042: tip99c.patch 2002-06-13 15:33 vincentdarley
File Deleted 24939: 2002-06-13 15:33 vincentdarley
File Deleted 24897: 2002-06-12 09:40 vincentdarley
summary a 'file link source ?target?' impl. 2002-06-12 09:40 vincentdarley
File Added 24939: tip99.patch 2002-06-12 09:40 vincentdarley
File Added 24897: fileLink7.patch 2002-06-11 18:01 vincentdarley
File Deleted 24866: 2002-06-11 18:01 vincentdarley
File Deleted 24783: 2002-06-11 10:46 vincentdarley
File Deleted 24816: 2002-06-11 10:46 vincentdarley
File Deleted 24862: 2002-06-11 10:46 vincentdarley
File Deleted 24788: 2002-06-11 10:46 vincentdarley
File Added 24866: fileLink6.patch 2002-06-11 10:46 vincentdarley
File Added 24862: fileLink5.patch 2002-06-11 09:07 vincentdarley
File Added 24816: fileLink4.patch 2002-06-10 19:02 vincentdarley
File Added 24788: fileLink2.patch 2002-06-10 12:56 vincentdarley
File Added 24783: fileLink.patch 2002-06-10 10:44 vincentdarley
File Deleted 24145: 2002-06-10 10:43 vincentdarley
File Added 24145: fileLink.diff 2002-05-31 16:23 vincentdarley