diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-10-24 14:29:35 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-10-24 14:29:35 (GMT) |
commit | f78fd9556a52ef9c7737df64e1d37f1ab5ba9746 (patch) | |
tree | fec73cd4bb84dace903da378ecd214cb13da4181 /doc/file.n | |
parent | a796f06789efc26f57bf30fd83ed98762f97ad30 (diff) | |
download | tcl-f78fd9556a52ef9c7737df64e1d37f1ab5ba9746.zip tcl-f78fd9556a52ef9c7737df64e1d37f1ab5ba9746.tar.gz tcl-f78fd9556a52ef9c7737df64e1d37f1ab5ba9746.tar.bz2 |
Lots of improvements to look and feel of manual pages
Diffstat (limited to 'doc/file.n')
-rw-r--r-- | doc/file.n | 48 |
1 files changed, 32 insertions, 16 deletions
@@ -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.44 2007/07/04 13:25:53 dkf Exp $ +'\" RCS: @(#) $Id: file.n,v 1.45 2007/10/24 14:29:38 dkf Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -122,7 +122,9 @@ Trying to delete a non-existent file is not considered an error. Trying to delete a read-only file will cause the file to be deleted, even if the \fB\-force\fR flags is not specified. If the \fB\-force\fR option is specified on a directory, Tcl will attempt both to change -permissions and move the current directory 'pwd' out of the given path +permissions and move the current directory +.QW pwd +out of the given path if that is necessary to allow the deletion to proceed. Arguments are processed in the order specified, halting at the first error, if any. A \fB\-\|\-\fR marks the end of switches; the argument following the @@ -132,9 +134,10 @@ a \fB\-\fR. \fBfile dirname \fIname\fR Returns a name comprised of all of the path components in \fIname\fR excluding the last element. If \fIname\fR is a relative file name and -only contains one path element, then returns ``\fB.\fR''. If \fIname\fR -refers to a root directory, then the root directory is returned. For -example, +only contains one path element, then returns +.QW \fB.\fR . +If \fIname\fR refers to a root directory, then the root directory is +returned. For example, .RS .CS \fBfile dirname c:/\fR @@ -272,16 +275,20 @@ under Windows. Returns a unique normalized path representation for the file-system object (file, directory, link, etc), whose string value can be used as a unique identifier for it. A normalized path is an absolute path which has -all '../', './' removed. Also it is one which is in the ``standard'' +all +.QW ../ , +.QW ./ +removed. Also it is one which is in the +.QW standard format for the native platform. On Unix, this means the segments leading up to the path must be free of symbolic links/aliases (but the very last path component may be a symbolic link), and on Windows it also means we want the long form with that form's case-dependence (which gives us a unique, case-dependent path). The one exception concerning the last link in the path is necessary, because Tcl or the user may wish to -operate on the actual symbolic link itself (for example 'file delete', 'file -rename', 'file copy' are defined to operate on symbolic links, not on the -things that they point to). +operate on the actual symbolic link itself (for example \fBfile +delete\fR, \fBfile rename\fR, \fBfile copy\fR are defined to operate +on symbolic links, not on the things that they point to). .RE .TP \fBfile owned \fIname\fR @@ -334,7 +341,9 @@ switches; the argument following the \fB\-\|\-\fR will be treated as a \fBfile rootname \fIname\fR . 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 +last +.QW . +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\fR ?\fIname\fR? @@ -388,12 +397,19 @@ the filesystem to use for the file, and the second, if given, an arbitrary string representing the filesystem-specific nature or type of the location within that filesystem. If a filesystem only supports one type of file, the second element may not be supplied. For example the -native files have a first element 'native', and a second element which +native files have a first element +.QW native , +and a second element which when given is a platform-specific type name for the file's system -(e.g. 'NTFS', 'FAT', on Windows). 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. +(e.g. +.QW NTFS , +.QW FAT , +on Windows). A generic virtual file system might return the list +.QW "vfs ftp" +to represent a file on a remote ftp site mounted as a virtual +filesystem through an extension called +.QW vfs . +If the file does not belong to any filesystem, an error is generated. .TP \fBfile tail \fIname\fR . @@ -464,7 +480,7 @@ set oldName foobar.txt set newName foo/bar.txt # Make sure that where we're going to move to exists... if {![\fBfile isdirectory\fR [\fBfile dirname\fR $newName]]} { - \fBfile mkdir\fR [\fBfile dirname\fR $newName] + \fBfile mkdir\fR [\fBfile dirname\fR $newName] } \fBfile rename\fR $oldName $newName \fBfile link\fR -symbolic $oldName $newName |