MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / DirIsWritable

Function DirIsWritable

src/util.cpp:183–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183bool DirIsWritable(const fs::path& directory)
184{
185 fs::path tmpFile = directory / fs::unique_path();
186
187 FILE* file = fsbridge::fopen(tmpFile, "a");
188 if (!file) return false;
189
190 fclose(file);
191 remove(tmpFile);
192
193 return true;
194}
195
196/**
197 * Interpret a string argument as a boolean.

Callers 2

LockDataDirectoryFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 1

fopenFunction · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68