util: Move CheckDiskSpace to util.

This commit is contained in:
Jim Posen
2018-09-01 15:18:02 -07:00
parent f3f9c1de19
commit 62e7addb63
5 changed files with 23 additions and 27 deletions

View File

@@ -72,6 +72,7 @@ bool RenameOver(fs::path src, fs::path dest);
bool LockDirectory(const fs::path& directory, const std::string lockfile_name, bool probe_only=false);
void UnlockDirectory(const fs::path& directory, const std::string& lockfile_name);
bool DirIsWritable(const fs::path& directory);
bool CheckDiskSpace(const fs::path& dir, uint64_t nAdditionalBytes = 0);
/** Release all directory locks. This is used for unit testing only, at runtime
* the global destructor will take care of the locks.