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.
131 The two time fields are measured in seconds since the epoch
132 (Jan 1 00:00 1970 GMT).
135 field reflects the time of the last change of content (except when later changed by
139 is the time of the most recent
145 for a directory it is the time of the most recent
150 of a file in the directory.
153 field records the last
156 also it is set whenever
159 In addition, for a directory, it is set by
165 all whether successful or not.
169 field names the user whose actions most recently changed the
175 records the number of bytes in the file.
176 Directories and most files representing devices have a conventional
181 request requires no special permissions.
185 request can change some of the file status information.
188 can be changed by anyone with write permission in the parent directory;
189 it is an error to change the name to that of an existing file.
192 can be changed (affecting the actual length of the file) by anyone with
193 write permission on the file.
194 It is an error to attempt to set the length of a directory to a non-zero value,
195 and servers may decide to reject length changes for other reasons.
200 can be changed by the owner of the file or the group leader of the file's current
202 The directory bit cannot be changed by a
204 the other defined permission and mode bits can.
207 can be changed: by the owner if also a member of the new group; or
208 by the group leader of the file's current group
209 if also leader of the new group
212 for more information about permissions and
214 for users and groups).
215 None of the other data can be altered by a
217 and attempts to change them will trigger an error.
219 it is illegal to attempt to change the owner of a file.
220 (These conditions may be
221 relaxed when establishing the initial state of a file server; see
224 Either all the changes in
226 request happen, or none of them does: if the request succeeds,
227 all changes were made; if it fails, none were.
231 request can avoid modifying some properties of the file
232 by providing explicit ``don't touch'' values in the
234 data that is sent: zero-length strings for text values and
235 the maximum unsigned value of appropriate size
237 As a special case, if
239 the elements of the directory entry in a
241 message are ``don't touch'' values, the server may interpret it
242 as a request to guarantee that the contents of the associated
243 file are committed to stable storage before the
246 (Consider the message to mean, ``make the state of the file
247 exactly what it claims to be.'')
251 of a directory yields an integral number of directory entries in
252 the machine independent encoding given above
258 information is sent as a 9P variable-length datum, it is limited to a maximum of
262 messages are generated by
268 messages are generated by
273 To make the contents of a directory, such as returned by
276 directory entry begins with a size field.
277 For consistency, the entries in
281 messages also contain
282 their size, which means the size appears twice.
285 message is formatted as
286 .RI ``(4+1+2+2+ n )[4]
295 is the value returned by