walk – descend a directory hierarchy
request carries as arguments an existing
and a proposed
(which must not be in use unless it is the same as
that the client wishes to associate with
the result of traversing the directory hierarchy
by ‘walking’ the hierarchy using the successive path name
must represent a directory unless zero path name elements are specified.
must be valid in the current session and must not have been opened for I/O
If the full sequence of
elements is walked successfully,
will represent the file that results.
will be unaffected.
is in use or otherwise illegal, an
(dot-dot) represents the parent directory.
(dot), meaning the current directory, is not used in the protocol.
It is legal for
to be zero, in which case
will represent the same file as
will usually succeed; this is equivalent to walking to dot.
The rest of this discussion assumes
is greater than zero.
path name elements
are walked in order, “elementwise”.
For the first elementwise walk
to succeed, the file identified by
must be a directory,
and the implied user of the request must have permission
to search the directory (see
Subsequent elementwise walks have equivalent restrictions
applied to the implicit fid that results from the preceding elementwise walk.
If the first element cannot be walked for any reason,
Otherwise, the walk will return an
qids corresponding, in order, to the files that are visited by the
successful elementwise walks;
is therefore either
or the index of the first elementwise walk that failed.
The value of
cannot be zero unless
will always be less than or equal to
Only if it is equal, however, will
be affected, in which case
will represent the file
reached by the final elementwise walk requested in the message.
of the name
in the root directory of a server is equivalent to a walk with no name elements.
is the same as
the above discussion applies, with the obvious difference
that if the walk changes the state of
it also changes the state of
is unaffected, then
is also unaffected.
To simplify the implementation of the servers, a maximum of sixteen name elements or qids
may be packed in a single message.
This constant is called
Despite this restriction, the system imposes no limit on the number of elements in a file name,
only the number that may be transmitted in a single message.
A call to
One or more
messages may be generated by
any of the following calls, which evaluate file names:
The file name element
(dot) is interpreted locally and
is not transmitted in