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

Function createDirectory

pdal/util/FileUtils.cpp:221–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220
221bool createDirectory(const std::string& dirname)
222{
223 std::string pth = CPLCleanTrailingSlash(dirname.c_str());
224 if (VSIMkdir(pth.c_str(), 0755) != 0)
225 {
226 if (errno == EEXIST)
227 return false;
228 else
229 {
230 std::stringstream ss;
231 ss << "Unable to create directory " << dirname << std::endl << VSIStrerror(errno);
232 throw std::runtime_error(ss.str());
233 }
234 }
235 else
236 return true;
237}
238
239
240bool createDirectories(const std::string& dirname)

Callers 2

TESTFunction · 0.85
runOgrWriterInfoFunction · 0.85

Calls 1

strMethod · 0.80

Tested by 2

TESTFunction · 0.68
runOgrWriterInfoFunction · 0.68