summaryrefslogtreecommitdiffstats
path: root/doc/file.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/file.n')
-rw-r--r--doc/file.n33
1 files changed, 32 insertions, 1 deletions
diff --git a/doc/file.n b/doc/file.n
index 7a2f9c6..681207f 100644
--- a/doc/file.n
+++ b/doc/file.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: file.n,v 1.6 2000/09/07 14:27:47 poenitz Exp $
+'\" RCS: @(#) $Id: file.n,v 1.7 2001/07/31 19:12:06 vincentdarley Exp $
'\"
.so man.macros
.TH file n 8.3 Tcl "Tcl Built-In Commands"
@@ -216,6 +216,16 @@ Returns the platform-specific name of the file. This is useful if the
filename is needed to pass to a platform-specific call, such as exec
under Windows or AppleScript on the Macintosh.
.TP
+\fBfile normalize \fIname\fR
+.
+Returns a unique normalised path representation for the file, whose string
+value can be used as a unique identifier for the it. A normalized path is
+one which has all '../', './' removed. Also it is one which is in the
+'standard' format for the native platform. On MacOS, Unix, this means the
+path must be free of symbolic links/aliases, and on Windows it means we want
+the long form, with the long form's case-dependence (which gives us a
+unique, case-dependent path).
+.TP
\fBfile owned \fIname\fR
.
Returns \fB1\fR if file \fIname\fR is owned by the current user, \fB0\fR
@@ -267,6 +277,14 @@ Returns all of the characters in \fIname\fR up to but not including the
last ``.'' character in the last component of name. If the last
component of \fIname\fR doesn't contain a dot, then returns \fIname\fR.
.TP
+\fBfile separator ?\fIname\fR?
+.
+If no argument is given, returns the character which is used to separate
+path segments for native files on this platform. If a path is given,
+the filesystem responsible for that path is asked to return its
+separator character. If no file system accepts \fIname\fR, an error
+is generated.
+.TP
\fBfile size \fIname\fR
.
Returns a decimal string giving the size of file \fIname\fR in bytes. If
@@ -303,6 +321,19 @@ values. The \fBtype\fR element gives the type of the file in the same
form returned by the command \fBfile type\fR. This command returns an
empty string.
.TP
+\fBfile system \fIname\fR
+.
+Returns a list of two elements, the first of which is the name of the
+filesystem to use for the file, and the second the type of the file
+within that filesystem. If a filesystem only supports one type of
+file, the second element may be null. For example the native files
+have a first element 'native', and a second element which is a
+platform-specific type name for the file (e.g. 'networked'), or
+possibly the empty string. A generic virtual file system might return
+the list 'vfs ftp' to represent a file on a remote ftp site mounted as
+a virtual filesystem through an extension called 'vfs'. If the file
+does not belong to any filesystem, an error is generated.
+.TP
\fBfile tail \fIname\fR
.
Returns all of the characters in \fIname\fR after the last directory