MCPcopy Create free account
hub / github.com/PDAL/PDAL / createDirectories

Function createDirectories

pdal/util/FileUtils.cpp:240–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238
239
240bool createDirectories(const std::string& dirname)
241{
242 std::string pth = CPLCleanTrailingSlash(dirname.c_str());
243 if (VSIMkdirRecursive(pth.c_str(), 0755) != 0)
244 {
245 if (errno == EEXIST)
246 return false;
247 else
248 {
249 std::stringstream ss;
250 ss << "Unable to create directories " << dirname << std::endl << VSIStrerror(errno);
251 throw std::runtime_error(ss.str());
252 }
253 }
254 else
255 return true;
256}
257
258
259void deleteDirectory(const std::string& dirname)

Callers 1

TESTFunction · 0.85

Calls 1

strMethod · 0.80

Tested by 1

TESTFunction · 0.68