<< Previous | Next >>

fat_SyncFile

int fat_SyncFile( FATfile *file );

Description

Updates the directory entry for the given file, committing cached size, dates, and attribute fields to the actual directory. This function has the same effect as closing and re-opening the file.

Parameters

file
Pointer to the open file.

Return Value

0: success.
-EINVAL: file is invalid.
-EPERM - this operation is not permitted on the root directory.
-EBUSY: the device is busy (Only if non-blocking). Call function again to complete the update.
-EFSTATE - file not open or in an invalid state.

Any other negative value: I/O error when updating the directory entry.

Library

FAT.LIB

See Also

fat_Close, fat_Open, fat_OpenDir


Dynamic C Functions << Previous | Next >> rabbit.com