diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-07-04 13:25:53 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-07-04 13:25:53 (GMT) |
commit | 726415ce000fd8fd519c61d004b3fb673977ef50 (patch) | |
tree | 9bdb4e78ebe8fe9ed13ff9265ae7379467f14fd9 /doc/file.n | |
parent | ef369d0c5ca00cc8fad599ea3c4dfc7df33e442f (diff) | |
download | tcl-726415ce000fd8fd519c61d004b3fb673977ef50.zip tcl-726415ce000fd8fd519c61d004b3fb673977ef50.tar.gz tcl-726415ce000fd8fd519c61d004b3fb673977ef50.tar.bz2 |
Minor formatting fixes and additional notes on portability of [file]
Diffstat (limited to 'doc/file.n')
-rw-r--r-- | doc/file.n | 10 |
1 files changed, 6 insertions, 4 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.43 2007/04/05 14:08:40 dkf Exp $ +'\" RCS: @(#) $Id: file.n,v 1.44 2007/07/04 13:25:53 dkf Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -427,8 +427,11 @@ Returns \fB1\fR if file \fIname\fR is writable by the current user, .TP \fBUnix\fR\0\0\0\0\0\0\0 . -These commands always operate using the real user and group identifiers, -not the effective ones. +The subcommands that test whether a particular mode of access is permitted +always operate using the real user and group identifiers, not the effective +ones. As such, robust code should just \fBopen\fR a file for reading instead +of testing to see whether it is readable with \fBfile readable\fR. This also +avoids potential race conditions. .SH EXAMPLES This procedure shows how to search for C files in a given directory that have a correspondingly-named object file in the current @@ -470,6 +473,5 @@ if {![\fBfile isdirectory\fR [\fBfile dirname\fR $newName]]} { .SH "SEE ALSO" chan(n), close(n), eof(n), fblocked(n), filename(n), flush(n), gets(n), open(n), seek(n), tell(n) - .SH KEYWORDS attributes, copy files, delete files, directory, file, move files, name, rename files, stat |