summaryrefslogtreecommitdiffstats
path: root/doc/file.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-26 20:11:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-26 20:11:50 (GMT)
commit6b9dd216db20bac6c76552a6193d67a01e1d34ee (patch)
treeb86166558de62f70eef1a7524fac75f7b47a4f44 /doc/file.n
parent236c395276f8f1cf4d5b745ea490b4966e6eb148 (diff)
downloadtcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.zip
tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.gz
tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.bz2
* changes: Updated for 8.5b2 release.core_8_5_b2
* doc/*.1: Revert doc changes that broke * doc/*.3: `make html` so we can get the release * doc/*.n: out the door.
Diffstat (limited to 'doc/file.n')
-rw-r--r--doc/file.n105
1 files changed, 41 insertions, 64 deletions
diff --git a/doc/file.n b/doc/file.n
index 2c3558c..adf54b6 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.46 2007/10/25 14:07:32 dkf Exp $
+'\" RCS: @(#) $Id: file.n,v 1.47 2007/10/26 20:11:52 dgp Exp $
'\"
.so man.macros
.TH file n 8.3 Tcl "Tcl Built-In Commands"
@@ -47,11 +47,11 @@ flags and their values. The second form returns the value for the
specific option. The third form sets one or more of the values. The
values are as follows:
.PP
-On Unix, \fB\-group\fR gets or sets the group name for the file. A group id
-can be given to the command, but it returns a group name. \fB\-owner\fR gets
+On Unix, \fB-group\fR gets or sets the group name for the file. A group id
+can be given to the command, but it returns a group name. \fB-owner\fR gets
or sets the user name of the owner of the file. The command returns the
owner name, but the numerical id can be passed when setting the
-owner. \fB\-permissions\fR sets or retrieves the octal code that chmod(1)
+owner. \fB-permissions\fR sets or retrieves the octal code that chmod(1)
uses. This command does also has limited support for setting using the
symbolic attributes for chmod(1), of the form [ugo]?[[+\-=][rwxst],[...]],
where multiple symbolic attributes can be separated by commas (example:
@@ -59,24 +59,24 @@ where multiple symbolic attributes can be separated by commas (example:
permissions for group and other). A simplified \fBls\fR style string,
of the form rwxrwxrwx (must be 9 characters), is also supported
(example: \fBrwxr\-xr\-t\fR is equivalent to 01755).
-On versions of Unix supporting file flags, \fB\-readonly\fR gives the
+On versions of Unix supporting file flags, \fB-readonly\fR gives the
value or sets or clears the readonly attribute of the file,
i.e. the user immutable flag \fBuchg\fR to chflags(1).
.PP
-On Windows, \fB\-archive\fR gives the value or sets or clears the
-archive attribute of the file. \fB\-hidden\fR gives the value or sets
-or clears the hidden attribute of the file. \fB\-longname\fR will
+On Windows, \fB-archive\fR gives the value or sets or clears the
+archive attribute of the file. \fB-hidden\fR gives the value or sets
+or clears the hidden attribute of the file. \fB-longname\fR will
expand each path element to its long version. This attribute cannot be
-set. \fB\-readonly\fR gives the value or sets or clears the readonly
-attribute of the file. \fB\-shortname\fR gives a string where every
+set. \fB-readonly\fR gives the value or sets or clears the readonly
+attribute of the file. \fB-shortname\fR gives a string where every
path element is replaced with its short (8.3) version of the
-name. This attribute cannot be set. \fB\-system\fR gives or sets or
+name. This attribute cannot be set. \fB-system\fR gives or sets or
clears the value of the system attribute of the file.
.PP
-On Mac OS X and Darwin, \fB\-creator\fR gives or sets the
-Finder creator type of the file. \fB\-hidden\fR gives or sets or clears
-the hidden attribute of the file. \fB\-readonly\fR gives or sets or
-clears the readonly attribute of the file. \fB\-rsrclength\fR gives
+On Mac OS X and Darwin, \fB-creator\fR gives or sets the
+Finder creator type of the file. \fB-hidden\fR gives or sets or clears
+the hidden attribute of the file. \fB-readonly\fR gives or sets or
+clears the readonly attribute of the file. \fB-rsrclength\fR gives
the length of the resource fork of the file, this attribute can only be
set to the value 0, which results in the resource fork being stripped
off the file.
@@ -122,9 +122,7 @@ 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
-.QW pwd
-out of the given path
+permissions and move the current directory '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
@@ -134,10 +132,9 @@ 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
-.QW \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 ``\fB.\fR''. If \fIname\fR
+refers to a root directory, then the root directory is returned. For
+example,
.RS
.CS
\fBfile dirname c:/\fR
@@ -198,7 +195,7 @@ is always canonical for the current platform: \fB/\fR for Unix and
Windows.
.RE
.TP
-\fBfile link ?\fI\-linktype\fR? \fIlinkName\fR ?\fItarget\fR?
+\fBfile link ?\fI-linktype\fR? \fIlinkName\fR ?\fItarget\fR?
.
If only one argument is given, that argument is assumed to be
\fIlinkName\fR, and this command returns the value of the link given by
@@ -219,20 +216,15 @@ link is created.
.
If the user wishes to make a link of a specific type only, (and signal an
error if for some reason that is not possible), then the optional
-\fI\-linktype\fR argument should be given. Accepted values for
-\fI\-linktype\fR are
-.QW "\-symbolic"
-and
-.QW "\-hard" .
+\fI-linktype\fR argument should be given. Accepted values for
+\fI-linktype\fR are "-symbolic" and "-hard".
.
On Unix, symbolic links can be made to relative paths, and those paths
must be relative to the actual \fIlinkName\fR's location (not to the
cwd), but on all other platforms where relative links are not supported,
target paths will always be converted to absolute, normalized form
before the link is created (and therefore relative paths are interpreted
-as relative to the cwd). Furthermore,
-.QW "~user"
-paths are always expanded
+as relative to the cwd). Furthermore, "~user" paths are always expanded
to absolute form. When creating links on filesystems that either do not
support any links, or do not support the specific type requested, an
error message will be returned. In particular Windows 95, 98 and ME do
@@ -280,20 +272,16 @@ 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
-.QW ../ ,
-.QW ./
-removed. Also it is one which is in the
-.QW standard
+all '../', './' removed. Also it is one which is in the ``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 \fBfile
-delete\fR, \fBfile rename\fR, \fBfile copy\fR are defined to operate
-on symbolic links, not on the things that they point 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).
.RE
.TP
\fBfile owned \fIname\fR
@@ -346,9 +334,7 @@ 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
-.QW .
-character in the last component of name. If the last
+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\fR ?\fIname\fR?
@@ -402,19 +388,12 @@ 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
-.QW native ,
-and a second element which
+native files have a first element 'native', and a second element which
when given is a platform-specific type name for the file's system
-(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.
+(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.
.TP
\fBfile tail \fIname\fR
.
@@ -432,15 +411,13 @@ Returns a string giving the type of file \fIname\fR, which will be one of
.TP
\fBfile volumes\fR
.
-Returns the absolute paths to the volumes mounted on the system, as a proper
-Tcl list. Without any virtual filesystems mounted as root volumes, on UNIX,
-the command will always return
-.QW "/" ,
-since all filesystems are locally mounted. On Windows, it will return a list
-of the available local drives (e.g.
-.QW "a:/ c:/" ).
-If any virtual filesystem has mounted additional volumes, they will be in the
-returned list.
+Returns the absolute paths to the volumes mounted on the system, as a
+proper Tcl list. Without any virtual filesystems mounted as root
+volumes, on UNIX, the command will always return "/", since all
+filesystems are locally mounted.
+On Windows, it will return a list of the available local drives
+(e.g. {a:/ c:/}). If any virtual filesystem has mounted additional
+volumes, they will be in the returned list.
.TP
\fBfile writable \fIname\fR
.
@@ -487,7 +464,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