MCPcopy Create free account
hub / github.com/bytedance/bolt / generateFileDirectory

Function generateFileDirectory

bolt/common/base/Fs.cpp:39–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace bytedance::bolt::common {
38
39bool generateFileDirectory(const char* dirPath) {
40 std::error_code errorCode;
41 const auto success = fs::create_directories(dirPath, errorCode);
42 fs::permissions(dirPath, fs::perms::all, fs::perm_options::replace);
43 if (!success && errorCode.value() != 0) {
44 LOG(ERROR) << "Failed to create file directory '" << dirPath
45 << "'. Error: " << errorCode.message() << " errno "
46 << errorCode.value();
47 return false;
48 }
49 return true;
50}
51
52std::optional<std::string> generateTempFilePath(
53 const char* basePath,

Callers 6

LocalFileSinkMethod · 0.85
persistReproInfoFunction · 0.85
persistReproInfoMethod · 0.85
TEST_FFunction · 0.85
LocalWriteFileMethod · 0.85
AsyncLocalWriteFileMethod · 0.85

Calls 2

messageMethod · 0.80
valueMethod · 0.45

Tested by 2

persistReproInfoMethod · 0.68
TEST_FFunction · 0.68