1.2.7.4.22 SYS_FS_FileCharacterPut Function
1.2.7.4.22 C
SYS_FS_RESULT SYS_FS_FileCharacterPut
(
SYS_FS_HANDLE handle,
char data
);
1.2.7.4.22 Summary
Writes a character to a file.
1.2.7.4.22 Description
This function writes a character to a file.
1.2.7.4.22 Precondition
The file into which a character has to be written, has to be present and should have been opened.
1.2.7.4.22 Parameters
| Parameters | Description |
|---|---|
| handle | File handle to which the character is to be written |
| data | Character to be written to the file |
1.2.7.4.22 Returns
SYS_FS_RES_SUCCESS - Write operation was successful.
SYS_FS_RES_FAILURE - Write operation was unsuccessful. The reason for the failure can be retrieved with SYS_FS_Error or SYS_FS_FileError.
1.2.7.4.22 Example
SYS_FS_RESULT res; SYS_FS_HANDLE fileHandle; fileHandle = SYS_FS_FileOpen("/mnt/myDrive/FILE.txt", (SYS_FS_FILE_OPEN_WRITE_PLUS)); if(fileHandle != SYS_FS_HANDLE_INVALID) { // File open is successful } // Write a character to the file. res = SYS_FS_FileCharacterPut(fileHandle, 'c'); if(res != SYS_FS_RES_SUCCESS) { // Character write operation failed. }
1.2.7.4.22 Remarks
None.
