Synchronize file data
#include <unistd.h> int fdatasync( int filedes );
- The descriptor of the file that you want to synchronize.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The fdatasync() function forces all queued I/O operations for the file specified by the filedes file descriptor to finish, synchronizing the file's data. The function blocks until this is finished. For more information about synchronizing, see " Filesystems and block I/O (devb-*) drivers " in the Fine-Tuning Your System chapter of the BlackBerry 10 OS User's Guide.
This function is similar to fsync(), except that fsync() also guarantees the integrity of file information, such as access and modification times.
- An error occurred ( errno is set).
- The specified filedes isn't a valid file descriptor open for writing.
- The implementation doesn't support synchronized I/O for the given file.
- The fdatasync() function isn't supported for the filesystem specified by filedes.
Last modified: 2014-06-24