File System

File System fsync

fsync

// PROTOTYPE
int fsync(int fd) 
  • fd: The file descriptor for the file, return from the open call.

Synchronizes the file data flash, for example writing out any cached data.

Returns 0 on success. On error, returns -1 and sets errno.