Menu

#209 TIP99, a 'file link source ?target?' impl.

closed-accepted
5
2014-08-28
2002-05-31
No

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?

Discussion

  • Vince Darley

    Vince Darley - 2002-06-10

    Logged In: YES
    user_id=32170

    deleted old patch.

     
  • Vince Darley

    Vince Darley - 2002-06-10

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

     
  • Vince Darley

    Vince Darley - 2002-06-10

    Logged In: YES
    user_id=32170

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

     
  • Vince Darley

    Vince Darley - 2002-06-10

    Logged In: YES
    user_id=32170

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

     
  • David Gravereaux

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

     
  • Vince Darley

    Vince Darley - 2002-06-11

    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?

     
  • Vince Darley

    Vince Darley - 2002-06-11

    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.

     
  • Vince Darley

    Vince Darley - 2002-06-11

    Logged In: YES
    user_id=32170

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

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

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

     
  • Vince Darley

    Vince Darley - 2002-06-12
    • summary: a 'file link source ?target?' impl. --> TIP99, a 'file link source ?target?' impl.
     
  • Vince Darley

    Vince Darley - 2002-06-12

    Logged In: YES
    user_id=32170

    renamed, and added new patch to latest cvs head.

     
  • Vince Darley

    Vince Darley - 2002-06-13

    Logged In: YES
    user_id=32170

    Added patch to latest cvs head.

     
  • Vince Darley

    Vince Darley - 2002-06-13

    Logged In: YES
    user_id=32170

    Added more tests.

     
  • Vince Darley

    Vince Darley - 2002-06-14

    Logged In: YES
    user_id=32170

    Added complete documentation and further tests.

     
  • Vince Darley

    Vince Darley - 2002-06-14

    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.

     
  • Vince Darley

    Vince Darley - 2002-06-18

    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.

     
  • Vince Darley

    Vince Darley - 2002-06-18

    diff -bu with windows eols against current cvs head

     
  • Vince Darley

    Vince Darley - 2002-06-21

    Logged In: YES
    user_id=32170

    Patch applied to cvs head.

     
  • Vince Darley

    Vince Darley - 2002-06-21
    • assigned_to: dkf --> vincentdarley
    • status: open --> closed-accepted