From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man9/read.html | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 man/man9/read.html (limited to 'man/man9/read.html') diff --git a/man/man9/read.html b/man/man9/read.html new file mode 100644 index 00000000..c524d8de --- /dev/null +++ b/man/man9/read.html @@ -0,0 +1,96 @@ + +read(9P) - Plan 9 from User Space + + + + +
+
+
READ(9P)READ(9P) +
+
+

NAME
+ +
+ + read, write – transfer data from and to a file
+ +
+

SYNOPSIS
+ +
+ + size[4] Tread tag[2] fid[4] offset[8] count[4]
+ size[4] Rread tag[2] count[4] data[count] +
+ + size[4] Twrite tag[2] fid[4] offset[8] count[4] data[count]
+ size[4] Rwrite tag[2] count[4]
+ +
+

DESCRIPTION
+ +
+ + 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. 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 or equal to 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(9P)), one for each member + of the directory. The read request message must have offset equal + to zero or the value of offset in the previous read on the directory, + plus the number of bytes returned in the previous + read. In other words, seeking other than to the beginning is illegal + in a directory. +
+ + 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 is 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. +
+ + Because 9P implementations may limit the size of individual messages, + more than one message may be produced by a single read or write + call. The iounit field returned by open(9P), if non-zero, reports + the maximum size that is guaranteed to be transferred atomically.
+ +
+

ENTRY POINTS
+ +
+ + Fsread and fswrite (see 9pclient(3)) generate the corresponding + messages. Because they take an offset parameter, the fspread and + fspwrite calls correspond more directly to the 9P messages. Although + fsseek affects the offset, it does not generate a message.
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3