Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 83049b902fb9a37ccec86cdde338e64b9d4e5af5
Ticket: 971976ffffffffffffffffffffffffffffffffff
Inconsistent naming in [file exists]
User & Date: vincentdarley on 2004-07-07 00:25:28
Changes

  1. icomment:
    Logged In: YES 
    user_id=32170
    
    The file normalize documentation says "Returns a unique
    normalised path representation for the file-system
    object (file, directory, link, etc), whose string value can
    be used as a unique identifier for it. ", so I think this
    says pretty clearly that $file and [file norm $file] must
    refer to the same thing, so it looks like we both agree with
    Tcl on that.
    
    >It's just that people very often 
    >don't want to feed normalized paths
    >to the underlying OS because they are really seeking to gain
    >information about how the OS interprets that denormalized form.
    
    Hold on! That's a very strong statement.  Why do you say that?
    
    When I use Tcl I want to operate on files, directories or
    whatever, and have no interest at all in gaining any
    information about how the OS interprets anything.
    
    If you really believe that's what 'people very often want',
    then Tcl 8.4 took a huge swerve in the wrong direction for
    those people - pretty much by _definition_ Tcl operates on
    normalized paths now.
    
    Anyway, assuming I've got the wrong end of the stick on this
    last bit, it suggests we've homed in on the proposal that
    'file norm' should preserve a single trailing '/', and
    therefore that 'file exists fileName/' will return 0, but
    that we have the possibility that there are two distinct
    names which might refer to the same filesystem entity, if
    that entity is a directory:
    
    [file norm dirName] != [file norm dirName/]
    
    and yet both refer to the same thing, so we'll need to
    document this interesting quirk.
    
    I don't know whether such a change requires a TIP or not. It
    certainly requires a bunch of new tests and docs.
    
    
    
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. username: "vincentdarley"