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

Function MkDirRecursiveInner

fuzz/libfuzzer/FuzzerIO.cpp:176–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176static bool MkDirRecursiveInner(const std::string &Leaf) {
177 // Prevent chance of potential infinite recursion
178 if (Leaf == ".")
179 return true;
180
181 const std::string &Dir = DirName(Leaf);
182
183 if (IsDirectory(Dir)) {
184 MkDir(Leaf);
185 return IsDirectory(Leaf);
186 }
187
188 bool ret = MkDirRecursiveInner(Dir);
189 if (!ret) {
190 // Give up early if a previous MkDir failed
191 return ret;
192 }
193
194 MkDir(Leaf);
195 return IsDirectory(Leaf);
196}
197
198bool MkDirRecursive(const std::string &Dir) {
199 if (Dir.empty())

Callers 1

MkDirRecursiveFunction · 0.85

Calls 3

DirNameFunction · 0.70
IsDirectoryFunction · 0.70
MkDirFunction · 0.70

Tested by

no test coverage detected