![]() |
|
The mi_file_write() function writes a specified number of bytes from a buffer to an open operating-system file.
fd | is the file descriptor of the file to be written. It is obtained by a previous call to mi_file_open(). |
buf | is the buffer from which to write the data. |
nbytes | is the number of bytes to write. |
The mi_file_write() function writes nbytes bytes of data to the file that the fd file descriptor identifies. The write begins at the current seek position for fd. You can use the mi_file_tell() function to obtain the current seek position. The function writes this data from the user-allocated buffer that buf references.
This function can access files on the server computer from a C UDR.
>=0 | is the actual number of bytes that the function has written to the open file. |
MI_ERROR | indicates that the function was not successful. |
The mi_file_write() function does not throw an MI_Exception event when it encounters a runtime error. Therefore, it does not cause callbacks to be invoked.
See the descriptions of the following functions: mi_file_open(), mi_file_read(), mi_file_seek(), and mi_file_tell().