Tread tag [2] fid [2] offset [8] count [2]
Rread tag [2] fid [2] count [2] pad [1] data [count]
Twrite tag [2] fid [2] offset [8] count [2] pad [1]
data [count]
Rwrite tag [2] fid [2] count [2]
The count field in the reply indicates the number of bytes returned. This may be less than the requested amount. If the offset field is greater than the number of bytes in the file, a count of zero will be returned.
For directories, read returns an integral number of directory entries exactly as in stat (see stat, wstat - inquire or change file attributes). one for each member of the directory. The read request message must have offset and count zero modulo DIRLEN (116, defined in <lib9.h>).
Directories may not be written by this mechanism. Directories are modified by create and remove requests. (See open, create - prepare a fid for I/O on a file for a description of the create request and remove - remove a file from a server.)
The write reply reports the number of bytes actually written. It is usually an error if this is not the same as requested.