Writes to an open file object.
#include <zPublics.h> STATUS zWrite( Key_t key, Xid_t xid, QUAD startingOffset, NINT bytesToWrite, const void *buffer, NINT *retBytesWritten);
(IN) Specifies the file object (as returned by zOpen or zCreate) being written.
(IN) Specifies the transaction associated with this request. If the requested action is not part of a transaction, pass zNILXID.
(IN) Specifies the logical byte offset in the file object at which the write is to begin. If this is beyond the current end of file, the file is sparsely extended and leaves a hole in the file between the old EOF and this startingOffset.
(IN) Specifies the number of bytes to write to the file object.
(IN) Points to the data to be written to the file object.
(OUT) Points to the actual number of bytes written.
zOK |
The operation completed successfully. |
non-0 |
An error occurred (see Section 4.1, Return Values for a description). |
zWrite writes the number of specified bytes from the buffer, starting at the startingOffset to the open file object identified by the key. The actual number of bytes written can be smaller than the requested number of bytes to be written.