#include <stdlib.h>
#include "../error/error.h"
Go to the source code of this file.
Defines | |
#define | NPS_FSYNC_LKG static inline |
Functions | |
NPS_FSYNC_LKG int | nps_fsync (const char *path, nps_error_t *error) |
#define NPS_FSYNC_LKG static inline |
NPS_FSYNC_LKG int nps_fsync | ( | const char * | path, | |
nps_error_t * | error | |||
) |
nps_fync is similar to sync, but acts on file names rather than file descriptors. It uses standard NPSML error handling.
The mechanism under the hood is to open the file for reading. As long as the file was closed before this call to fopen, POSIX close->open consistency guarantees the file buffer is flushed to storage.