Plan 9 - man page for read (plan9 section 5)
|Linux & Unix Commands - Search Man Pages
read, write - transfer data from and to a file
Tread tag fid offset count
Rread tag fid count pad data[count]
Twrite tag fid offset count pad data[count]
Rwrite tag fid count
The read request asks for count bytes of data from the file identified by fid, which must
be opened for reading, starting offset bytes after the beginning of the file. Count must
be less than or equal to MAXFDATA (8192, defined in <fcall.h>). The bytes are returned
with the read reply message.
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(5)), one for each member of the direc-
tory. The read request message must have offset and count zero modulo DIRLEN.
The write request asks that count bytes of data be recorded in the file identified by fid,
which must be opened for writing, starting offset bytes after the beginning of the file.
If the file has been opened append only, the data will be placed at the end of the file
regardless of offset. Directories may not be written.
The write reply records the number of bytes actually written. It is usually an error if
this is not the same as requested.
Read and write messages are generated by the corresponding calls. Because of the MAXFDATA
limit, more than one message may be produced by a single call.
All times are GMT -4. The time now is 12:24 PM.