3 stat, wstat \- inquire or change file attributes
28 transaction inquires about the file
31 The reply will contain a
39 total byte count of the following data
48 the type of the file (directory, etc.), represented as a bit vector
49 corresponding to the high 8 bits of the file's mode word.
52 version number for given path
55 the file server's unique identification for the file
64 last modification time
67 length of file in bytes
72 if the file is the root directory of the server
81 name of the user who last modified the file
84 Integers in this encoding are in little-endian order (least
85 significant byte first).
92 convert between directory entries and a C structure called a
97 contains permission bits as described in
102 this file is a directory),
114 Writes to append-only files always place their data at the
119 message is ignored, as is the
122 Exclusive use files may be open for I/O by only one fid at a time
123 across all clients of the server. If a second open is attempted,
124 it draws an error. Servers may implement a timeout on the lock
125 on an exclusive use file: if the fid holding the file open has
126 been unused for an extended period (of order at least minutes),
127 it is reasonable to break the lock and deny the initial fid
129 Temporary files are not included in nightly archives
130 (see Plan 9's \fIfossil\fR(4)).
132 The two time fields are measured in seconds since the epoch
133 (Jan 1 00:00 1970 GMT).
136 field reflects the time of the last change of content (except when later changed by
140 is the time of the most recent
146 for a directory it is the time of the most recent
151 of a file in the directory.
154 field records the last
157 also it is set whenever
160 In addition, for a directory, it is set by
166 all whether successful or not.
170 field names the user whose actions most recently changed the
176 records the number of bytes in the file.
177 Directories and most files representing devices have a conventional
182 request requires no special permissions.
186 request can change some of the file status information.
189 can be changed by anyone with write permission in the parent directory;
190 it is an error to change the name to that of an existing file.
193 can be changed (affecting the actual length of the file) by anyone with
194 write permission on the file.
195 It is an error to attempt to set the length of a directory to a non-zero value,
196 and servers may decide to reject length changes for other reasons.
201 can be changed by the owner of the file or the group leader of the file's current
203 The directory bit cannot be changed by a
205 the other defined permission and mode bits can.
208 can be changed: by the owner if also a member of the new group; or
209 by the group leader of the file's current group
210 if also leader of the new group
213 for more information about permissions, users, and groups).
214 None of the other data can be altered by a
216 and attempts to change them will trigger an error.
218 it is illegal to attempt to change the owner of a file.
219 (These conditions may be
220 relaxed when establishing the initial state of a file server; see
221 Plan 9's \fIfsconfig\fR(8).)
223 Either all the changes in
225 request happen, or none of them does: if the request succeeds,
226 all changes were made; if it fails, none were.
230 request can avoid modifying some properties of the file
231 by providing explicit ``don't touch'' values in the
233 data that is sent: zero-length strings for text values and
234 the maximum unsigned value of appropriate size
236 As a special case, if
238 the elements of the directory entry in a
240 message are ``don't touch'' values, the server may interpret it
241 as a request to guarantee that the contents of the associated
242 file are committed to stable storage before the
245 (Consider the message to mean, ``make the state of the file
246 exactly what it claims to be.'')
250 of a directory yields an integral number of directory entries in
251 the machine independent encoding given above
257 information is sent as a 9P variable-length datum, it is limited to a maximum of
261 messages are generated by
269 messages are generated by
274 To make the contents of a directory, such as returned by
277 directory entry begins with a size field.
278 For consistency, the entries in
282 messages also contain
283 their size, which means the size appears twice.
286 message is formatted as
287 .RI ``(4+1+2+2+ n )[4]
296 is the value returned by