MCPcopy Create free account
hub / github.com/ElementsProject/elements / DirIsWritable

Function DirIsWritable

src/util/system.cpp:147–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147bool DirIsWritable(const fs::path& directory)
148{
149 fs::path tmpFile = GetUniquePath(directory);
150
151 FILE* file = fsbridge::fopen(tmpFile, "a");
152 if (!file) return false;
153
154 fclose(file);
155 remove(tmpFile);
156
157 return true;
158}
159
160bool CheckDiskSpace(const fs::path& dir, uint64_t additional_bytes)
161{

Callers 2

LockDataDirectoryFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 2

GetUniquePathFunction · 0.85
fopenFunction · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68