rbb 99/02/25 11:55:22
Modified: docs fileio.txt
Log:
Re-wrote fileio.txt for apr_read and apr_write. I also modified apr_close.
Revision Changes Path
1.4 +26 -17 apache-apr/docs/fileio.txt
Index: fileio.txt
===================================================================
RCS file: /home/cvs/apache-apr/docs/fileio.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- fileio.txt 1999/02/23 21:13:55 1.3
+++ fileio.txt 1999/02/25 19:55:22 1.4
@@ -15,7 +15,8 @@
APR_TRUNCATE If the file is there, length is
truncated to 0.
APR_BINARY Not a text file.
- APR_BUFFERED buffer the data.
+ APR_BUFFERED buffer the data. Default is
+ non-buffered
APR_EXCL return error if APR_CREATE and file
exists.
APR_NONBLOCK don't block on read or write.
@@ -32,38 +33,34 @@
is small, and a stat isn't required after opening the file.
-apr_status_t apr_close(apr_file_t);
+apr_status_t apr_close(apr_file_t *);
Close the specified file descriptor
Arguments:
arg 1) file descriptor of file to be closed.
+ return) APR_SUCCESS or APR_FAILURE
+
Notes: The fields within the APRFile structure will not be changed when a
file
is closed. The ONLY updated field, will be the file descriptor.
- APRStatus apr_read(APRFile, void *, APRUInt64, APRUInt64 *)
+ apr_uint64_t apr_read(apr_file_t *, void *, apr_uint64_t)
Read n bytes from file and store in buffer.
Arguments:
arg 1) File descriptor to read from
arg 2) buffer to store data in
arg 3) number of bytes to read
- arg 4) pointer to number of bytes read. (returned by APR)
- APRStatus apr_write(APRFile, void *, APRUInt64, APRUInt64 *)
+ return) pointer to number of bytes read.
+
+ apr_uint64_t apr_write(apr_file_t *, void *, apr_uint64_t)
Write n bytes of data from buffer to file
Arguments:
arg 1) File descriptor to write data to
arg 2) buffer to read data from
arg 3) number of bytes to write
- arg 4) pointer to number of bytes written. (returned by APR)
- APRStatus apr_writev(APRFile, APRIOVec *, APRUInt64, APUInt64 *)
- Same as apr_write, except it gets the data from the APRIOVec array.
- Arguments:
- arg 1) File descriptor to write data to
- arg 2) Array from which to get the data to write to the file
- arg 3) Number of elements in the APRIOVec array. Must be smaller
- than apr_MAX_IOVEC_SIZE, if not function will fail with
- apr_BUFFER_OVERFLOW_ERROR
- arg 4) number of bytes written. APR_FAILURE on failure.
- NOTES: apr_writev will write a complete entry from APRIOVec array before
- moving on to the next one.
+ return) pointer to number of bytes written.
+
+Notes: apr_write tries to update the apr_file_t that is passed in, but it
fails
+ silently if it is unable to do so.
+
APRStatus apr_getfileinfo(char *, APRFileInfo *)
Get information about the file with the given path name.
Arguments:
@@ -96,6 +93,18 @@
Arguments:
arg 1) Abstracted directory descriptor to read from.
arg 2) the next directory entry.
+
+ APRStatus apr_writev(APRFile, APRIOVec *, APRUInt64, APUInt64 *)
+ Same as apr_write, except it gets the data from the APRIOVec array.
+ Arguments:
+ arg 1) File descriptor to write data to
+ arg 2) Array from which to get the data to write to the file
+ arg 3) Number of elements in the APRIOVec array. Must be smaller
+ than apr_MAX_IOVEC_SIZE, if not function will fail with
+ apr_BUFFER_OVERFLOW_ERROR
+ arg 4) number of bytes written. APR_FAILURE on failure.
+ NOTES: apr_writev will write a complete entry from APRIOVec array before
+ moving on to the next one.
**************** IMPLEMENTATION DETAILS **************