MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getDirectoryCount

Method getDirectoryCount

Engine/source/core/util/path.cpp:373–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373U32 Path::getDirectoryCount() const
374{
375 if (mPath.isEmpty())
376 return 0;
377
378 U32 count = 0;
379 U32 offset = 0;
380
381 if (mPath.c_str()[0] == '/')
382 offset++;
383
384 while (offset < mPath.length())
385 {
386 if (mPath[offset++] == '/')
387 count++;
388 }
389
390 return count + 1;
391}
392
393String Path::getDirectory(U32 count) const
394{

Callers 4

_dumpDirectoriesMethod · 0.80
createPathMethod · 0.80
MakeRelativePathMethod · 0.80
getFolderPrefixedNameMethod · 0.80

Calls 3

isEmptyMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected