f_close

Function f_close closes a file.

FRESULT f_close (
  FIL* FileObject     // Pointer to the file object structure
);

Parameter

FileObject
Pointer to the file object structure to be closed.

Return Values

FR_OK (0)
The file has been closed successfuly.
FR_RW_ERROR
Any error occured in low level disk I/O.
FR_INCORRECT_DISK_CHANGE
Incorrect disk removal, such as a medium change during any file is opend, has been occured.
FR_NOT_ENABLED
FatFs module is not enabled.

Description

Function f_close closes a file. When the function succeeded, the file object structure can be discarded.

References

f_open, f_read, f_write, f_sync, FIL, FATFS

Return