MCPcopy Create free account
hub / github.com/beefytech/Beef / RecursiveCreateDirectory

Method RecursiveCreateDirectory

BeefySysLib/Common.cpp:1314–1335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1312}
1313
1314bool Beefy::RecursiveCreateDirectory(const StringImpl& dirName)
1315{
1316 int slashPos = -1;
1317 for (int i = (int)dirName.length() - 1; i >= 0; i--)
1318 {
1319 char c = dirName[i];
1320 if ((c == '\\') || (c == '/'))
1321 {
1322 slashPos = i;
1323 break;
1324 }
1325 }
1326
1327 if (slashPos != -1)
1328 {
1329 RecursiveCreateDirectory(dirName.Substring(0, slashPos));
1330 }
1331
1332 BfpFileResult result;
1333 BfpDirectory_Create(dirName.c_str(), &result);
1334 return result == BfpFileResult_Ok;
1335}
1336
1337bool Beefy::RecursiveDeleteDirectory(const StringImpl& dirPath)
1338{

Callers

nothing calls this directly

Calls 4

SubstringMethod · 0.80
BfpDirectory_CreateFunction · 0.50
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected