Diff
Not logged in

Differences From Artifact [744aba6a86]:

To Artifact [c3de60f349]:


63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
63
64
65
66
67
68
69







70
71
72
73
74
75
76







-
-
-
-
-
-
-







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
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
clears the value of the system attribute of the file.
.PP
On Macintosh, \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. Note that directories can only be locked if
File Sharing is turned on. \fB-type\fR gives or sets the Finder file
type for the file.
.RE
.VS
.TP
\fBfile channels ?\fIpattern\fR?
.
If \fIpattern\fR isn't specified, returns a list of names of all
registered open channels in this interpreter.  If \fIpattern\fR is
122
123
124
125
126
127
128
129
130


131
132
133
134
135
136
137
115
116
117
118
119
120
121


122
123
124
125
126
127
128
129
130







-
-
+
+







A \fB\-\|\-\fR marks the end of switches; the argument following the
\fB\-\|\-\fR will be treated as a \fIpathname\fR even if it starts with
a \fB\-\fR.
.TP
\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'' (or ``\fB:\fR''
on the Macintosh).  If \fIname\fR refers to a root directory, then the
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
.CE
returns \fBc:/\fR. 
.PP
182
183
184
185
186
187
188
189

190
191
192
193
194
195
196
175
176
177
178
179
180
181

182
183
184
185
186
187
188
189







-
+







.CS
\fBfile join a b /foo bar\fR
.CE
returns \fB/foo/bar\fR.
.PP
Note that any of the names can contain separators, and that the result
is always canonical for the current platform: \fB/\fR for Unix and
Windows, and \fB:\fR for Macintosh.
Windows.
.RE
.TP
\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
\fIlinkName\fR (i.e. the name of the file it points to).  If
247
248
249
250
251
252
253
254

255
256
257
258
259
260
261
240
241
242
243
244
245
246

247
248
249
250
251
252
253
254







-
+







1, 1970).  If the file doesn't exist or its modified time cannot be queried
or set then an error is generated.
.TP
\fBfile nativename \fIname\fR
.
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.
under Windows.
.TP
\fBfile normalize \fIname\fR
.
.RS
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
394
395
396
397
398
399
400
401

402
403
404
405
406
407
408
409
410
411
387
388
389
390
391
392
393

394



395
396
397
398
399
400
401







-
+
-
-
-







Returns a string giving the type of file \fIname\fR, which will be one of
\fBfile\fR, \fBdirectory\fR, \fBcharacterSpecial\fR, \fBblockSpecial\fR,
\fBfifo\fR, \fBlink\fR, or \fBsocket\fR.
.TP
\fBfile volumes\fR
. 
Returns the absolute paths to the volumes mounted on the system, as a
proper Tcl list.  On the Macintosh, this will be a list of the mounted
proper Tcl list.  On UNIX, the
drives, both local and network.  N.B. if two drives have the same name,
they will both appear on the volume list, but there is currently no way,
from Tcl, to access any but the first of these drives.  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:/}).
.TP
\fBfile writable \fIname\fR
.
Returns \fB1\fR if file \fIname\fR is writable by the current user,