Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.h
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
void PrintExceptionContinue(const std::exception *pex, const char *pszThread); | void PrintExceptionContinue(const std::exception *pex, const char *pszThread); | ||||
bool FileCommit(FILE *file); | bool FileCommit(FILE *file); | ||||
bool TruncateFile(FILE *file, unsigned int length); | bool TruncateFile(FILE *file, unsigned int length); | ||||
int RaiseFileDescriptorLimit(int nMinFD); | int RaiseFileDescriptorLimit(int nMinFD); | ||||
void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length); | void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length); | ||||
bool RenameOver(fs::path src, fs::path dest); | bool RenameOver(fs::path src, fs::path dest); | ||||
bool LockDirectory(const fs::path &directory, const std::string lockfile_name, | bool LockDirectory(const fs::path &directory, const std::string lockfile_name, | ||||
bool probe_only = false); | bool probe_only = false); | ||||
void UnlockDirectory(const fs::path &directory, | |||||
const std::string &lockfile_name); | |||||
bool DirIsWritable(const fs::path &directory); | bool DirIsWritable(const fs::path &directory); | ||||
bool CheckDiskSpace(const fs::path &dir, uint64_t additional_bytes = 0); | bool CheckDiskSpace(const fs::path &dir, uint64_t additional_bytes = 0); | ||||
/** | /** | ||||
* Release all directory locks. This is used for unit testing only, at runtime | * Release all directory locks. This is used for unit testing only, at runtime | ||||
* the global destructor will take care of the locks. | * the global destructor will take care of the locks. | ||||
*/ | */ | ||||
void ReleaseDirectoryLocks(); | void ReleaseDirectoryLocks(); | ||||
▲ Show 20 Lines • Show All 319 Lines • Show Last 20 Lines |