MCPcopy Create free account
hub / github.com/KDAB/codebrowser / create_directory

Function create_directory

generator/filesystem.cpp:52–62  ·  view source on GitHub ↗

Based on the one from Support/Unix/PathV2 but with different default rights */

Source from the content-addressed store, hash-verified

50
51/* Based on the one from Support/Unix/PathV2 but with different default rights */
52static std::error_code create_directory(const llvm::Twine& path)
53{
54 using namespace llvm;
55 SmallString<128> path_storage;
56 StringRef p = path.toNullTerminatedStringRef(path_storage);
57 if (::mkdir(p.begin(), 0755) == -1) {
58 if (errno != static_cast<int>(std::errc::file_exists))
59 return {errno, std::system_category()};
60 }
61 return {};
62}
63
64std::error_code create_directories(const llvm::Twine& path)
65{

Callers 1

create_directoriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected