FileFlush
Description
Flush any kernel-side buffering for the file. On POSIX with no user-side buffering this is a no-op success unless the platform needs an fsync (we don’t fsync today; callers that need durable writes should fsync the fd themselves). On Windows it calls FlushFileBuffers.
Success
Returns true.
Failure
Returns false.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Io.c:521:
}
if (ok && !FileFlush(stream)) {
LOG_ERROR("Failed to flush formatted output");
ok = false;- In
File.c:324:
}
bool FileFlush(File *f) {
if (!FileIsValid(f)) {
return false;
Last updated on