diff options
author | Evan Klitzke <evan@eklitzke.org> | 2018-03-15 06:54:11 -0700 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2020-08-25 16:46:46 +0000 |
commit | 220bb16cbee5b91d0bc0fcc6c71560d631295fa5 (patch) | |
tree | bc8068b3a2abe2c0a03d1ad5a660e83cc32fb671 /src/util/system.h | |
parent | ce5cbaea63ad4ea78e533bdb14f47f414061ae7f (diff) |
util: Introduce DirectoryCommit commit function to sync a directory
Diffstat (limited to 'src/util/system.h')
-rw-r--r-- | src/util/system.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/system.h b/src/util/system.h index d2373998df..029204f01e 100644 --- a/src/util/system.h +++ b/src/util/system.h @@ -62,6 +62,13 @@ void PrintExceptionContinue(const std::exception *pex, const char* pszThread); * feature analogous to fsync(). */ bool FileCommit(FILE *file); + +/** + * Sync directory contents. This is required on some environments to ensure that + * newly created files are committed to disk. + */ +void DirectoryCommit(const fs::path &dirname); + bool TruncateFile(FILE *file, unsigned int length); int RaiseFileDescriptorLimit(int nMinFD); void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length); |