summaryrefslogtreecommitdiffstats
path: root/doc/filename.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-07-04 13:25:53 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-07-04 13:25:53 (GMT)
commit726415ce000fd8fd519c61d004b3fb673977ef50 (patch)
tree9bdb4e78ebe8fe9ed13ff9265ae7379467f14fd9 /doc/filename.n
parentef369d0c5ca00cc8fad599ea3c4dfc7df33e442f (diff)
downloadtcl-726415ce000fd8fd519c61d004b3fb673977ef50.zip
tcl-726415ce000fd8fd519c61d004b3fb673977ef50.tar.gz
tcl-726415ce000fd8fd519c61d004b3fb673977ef50.tar.bz2
Minor formatting fixes and additional notes on portability of [file]
Diffstat (limited to 'doc/filename.n')
-rw-r--r--doc/filename.n13
1 files changed, 4 insertions, 9 deletions
diff --git a/doc/filename.n b/doc/filename.n
index d7dda13..c0bad63 100644
--- a/doc/filename.n
+++ b/doc/filename.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: filename.n,v 1.14 2006/05/24 10:31:27 dkf Exp $
+'\" RCS: @(#) $Id: filename.n,v 1.15 2007/07/04 13:25:54 dkf Exp $
'\"
.so man.macros
.TH filename n 7.5 Tcl "Tcl Built-In Commands"
@@ -25,7 +25,6 @@ to be portable should not assume a particular form for file names.
Instead, portable scripts must use the \fBfile split\fR and \fBfile
join\fR commands to manipulate file names (see the \fBfile\fR manual
entry for more details).
-
.SH "PATH TYPES"
.PP
File names are grouped into three general types based on the starting point
@@ -38,13 +37,12 @@ qualified, either giving the path relative to the root directory on the
current volume, or relative to the current directory of the specified
volume. The \fBfile pathtype\fR command can be used to determine the
type of a given path.
-
.SH "PATH SYNTAX"
.PP
The rules for native names depend on the value reported in the Tcl
array element \fBtcl_platform(platform)\fR:
.TP 10
-\fBunix\fR
+\fBUnix\fR
On Unix and Apple MacOS X platforms, Tcl uses path names where the
components are separated by slashes. Path names may be relative or
absolute, and file names may contain any character other than slash.
@@ -55,10 +53,10 @@ separator. Any number of trailing slash characters at the end of a
path are simply ignored, so the paths \fBfoo\fR, \fBfoo/\fR and
\fBfoo//\fR are all identical, and in particular \fBfoo/\fR does not
necessarily mean a directory is being referred.
+.RS
.PP
The following examples illustrate various forms of path
names:
-.RS
.TP 15
\fB/\fR
Absolute path to the root directory.
@@ -82,7 +80,7 @@ Relative path to the file \fBfoo\fR in the directory above the current
directory.
.RE
.TP
-\fBwindows\fR
+\fBWindows\fR
On Microsoft Windows platforms, Tcl supports both drive-relative and UNC
style names. Both \fB/\fR and \fB\e\fR may be used as directory separators
in either type of name. Drive-relative names consist of an optional drive
@@ -122,7 +120,6 @@ Volume-relative path to a file \fBfoo\fR in the root directory of the current
volume. This is not a valid UNC path, so the assumption is that the
extra backslashes are superfluous.
.RE
-
.SH "TILDE SUBSTITUTION"
.PP
In addition to the file name rules described above, Tcl also supports
@@ -143,7 +140,6 @@ file. The behaviour of these paths when not trying to interpret them is
the same as on Unix. File names that have a tilde without a user name
will be correctly substituted using the \fB$HOME\fR environment
variable, just like for Unix.
-
.SH "PORTABILITY ISSUES"
.PP
Not all file systems are case sensitive, so scripts should avoid code
@@ -172,6 +168,5 @@ illegal.
.SH KEYWORDS
current directory, absolute file name, relative file name,
volume-relative file name, portability
-
.SH "SEE ALSO"
file(n), glob(n)