MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / isDirectoryWritable

Function isDirectoryWritable

src/backend/common/util.cpp:198–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198bool isDirectoryWritable(const string& path) {
199 if (!directoryExists(path) && !createDirectory(path)) { return false; }
200
201 const string testPath = path + AF_PATH_SEPARATOR + "test";
202 if (!ofstream(testPath).is_open()) { return false; }
203 removeFile(testPath);
204
205 return true;
206}
207
208#ifndef NOSPDLOG
209string& getCacheDirectory() {

Callers 1

util.cppFile · 0.85

Calls 3

directoryExistsFunction · 0.85
createDirectoryFunction · 0.85
removeFileFunction · 0.85

Tested by

no test coverage detected