Write data to the open file. The write function has some restrictions listed below:
Cannot create file. Only existing file can be written. Cannot expand file size. Cannot update time stamp of the file. Write operation can start/stop on the sector boundary only. Read-only attribute of the file cannot block write operation.
The read/write pointer in the file system object advances in number of bytes written. After the function succeeded, bw should be checked to detect end of file. In case of bw is less than btw , it means the read/write pointer reached end of file during the write operation. Once a write operation is initiated, it must be finalized properly, or the written data can be lost.
|