MCPcopy Create free account
hub / github.com/HexHive/NASS / ValidateDirectoryExists

Function ValidateDirectoryExists

fuzz/libfuzzer/FuzzerDriver.cpp:261–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261static void ValidateDirectoryExists(const std::string &Path,
262 bool CreateDirectory) {
263 if (Path.empty()) {
264 Printf("ERROR: Provided directory path is an empty string\n");
265 exit(1);
266 }
267
268 if (IsDirectory(Path))
269 return;
270
271 if (CreateDirectory) {
272 if (!MkDirRecursive(Path)) {
273 Printf("ERROR: Failed to create directory \"%s\"\n", Path.c_str());
274 exit(1);
275 }
276 return;
277 }
278
279 Printf("ERROR: The required directory \"%s\" does not exist\n", Path.c_str());
280 exit(1);
281}
282
283std::string CloneArgsWithoutX(const std::vector<std::string> &Args,
284 const char *X1, const char *X2) {

Callers 1

FuzzerDriverFunction · 0.85

Calls 5

MkDirRecursiveFunction · 0.85
PrintfFunction · 0.70
IsDirectoryFunction · 0.70
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected