In addition to Macintosh style names, Tcl also supports a subset of Unix-like names. If a path contains no colons, then it is interpreted like a Unix path. Slash is used as the path separator. The file name . refers to the current directory, and .. refers to the parent of the current directory. However, some names like / or /.. have no mapping, and are interpreted as Macintosh names. In general, commands that generate file names will return Macintosh style names, but commands that accept file names will take both Macintosh and Unix-style names.
The following examples illustrate various forms of path names:
The Macintosh and Windows platforms do not support tilde substitution when a user name follows the tilde. On these platforms, attempts to use a tilde followed by a user name will generate an error. File names that have a tilde without a user name will be substituted using the $HOME environment variable, just like for Unix.
Copyright © 1995-1996 Sun Microsystems, Inc. Copyright © 1995, 1996 Roger E. Critchlow Jr.