fs_fclose()
int fs_fclose (FS_FILE *p_file);
File | Called from | Code enabled by |
---|---|---|
| Application |
|
Close and free a file.
Arguments
p_file
Pointer to a file.
Returned Value
0, if the file was successfully closed.
FS_EOF
, otherwise.
Notes/Warnings
- After a file is closed, the application must desist from accessing its file pointer. This could cause file system corruption, since this handle may be re-used for a different file.
- If the most recent operation is output (write), all unwritten data is written to the file.
- Any buffer assigned with
fs_setbuf()
orfs_setvbuf()
shall no longer be accessed by the file system and may be re-used by the application.