Changeset View
Changeset View
Standalone View
Standalone View
src/util.h
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
bool SetupNetworking(); | bool SetupNetworking(); | ||||
template <typename... Args> bool error(const char *fmt, const Args &... args) { | template <typename... Args> bool error(const char *fmt, const Args &... args) { | ||||
LogPrintf("ERROR: " + tfm::format(fmt, args...) + "\n"); | LogPrintf("ERROR: " + tfm::format(fmt, args...) + "\n"); | ||||
return false; | return false; | ||||
} | } | ||||
void PrintExceptionContinue(const std::exception *pex, const char *pszThread); | void PrintExceptionContinue(const std::exception *pex, const char *pszThread); | ||||
void 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); | ||||
bool DirIsWritable(const fs::path &directory); | bool DirIsWritable(const fs::path &directory); | ||||
bool CheckDiskSpace(const fs::path &dir, uint64_t nAdditionalBytes = 0); | bool CheckDiskSpace(const fs::path &dir, uint64_t nAdditionalBytes = 0); | ||||
▲ Show 20 Lines • Show All 255 Lines • Show Last 20 Lines |