MCPcopy Create free account
hub / github.com/LUX-Core/lux / FileCommit

Function FileCommit

src/util.cpp:691–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691void FileCommit(FILE* fileout)
692{
693 fflush(fileout); // harmless if redundantly called
694#ifdef WIN32
695 HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(fileout));
696 FlushFileBuffers(hFile);
697#else
698#if defined(__linux__) || defined(__NetBSD__)
699 fdatasync(fileno(fileout));
700#elif defined(__APPLE__) && defined(F_FULLFSYNC)
701 fcntl(fileno(fileout), F_FULLFSYNC, 0);
702#else
703 fsync(fileno(fileout));
704#endif
705#endif
706}
707
708bool TruncateFile(FILE* file, unsigned int length)
709{

Callers 2

FlushBlockFileFunction · 0.85
WriteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected