MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / dumpDirectories

Method dumpDirectories

engine/source/platformAndroid/AndroidFileio.cpp:1129–1159  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1127
1128//-----------------------------------------------------------------------------
1129bool Platform::dumpDirectories(const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath)
1130{
1131 if (isCachePath(path) || isUserDataPath(path))
1132 {
1133 PROFILE_START(dumpDirectories);
1134
1135 ResourceManager->initExcludedDirectories();
1136
1137 const S32 len = dStrlen(path)+1;
1138 char newpath[len];
1139 dSprintf(newpath, len, "%s", path);
1140 if(newpath[len - 1] == '/')
1141 newpath[len - 1] = '\0'; // cut off the trailing slash, if there is one
1142
1143 // Insert base path to follow what Windows does.
1144 if ( !noBasePath )
1145 directoryVector.push_back(StringTable->insert(newpath));
1146
1147 bool ret = recurseDumpDirectoriesCache(newpath, "", directoryVector, depth, noBasePath);
1148 PROFILE_END();
1149
1150 return ret;
1151 }
1152
1153 PROFILE_START(dumpDirectories);
1154 ResourceManager->initExcludedDirectories();
1155 bool ret = android_DumpDirectories(path, "", directoryVector, depth, noBasePath);
1156 PROFILE_END();
1157
1158 return ret;
1159}
1160
1161//-----------------------------------------------------------------------------
1162/*static bool recurseDumpPath(const char* curPath, Vector<Platform::FileInfo>& fileVector, U32 depth)

Callers

nothing calls this directly

Calls 9

isCachePathFunction · 0.85
isUserDataPathFunction · 0.85
android_DumpDirectoriesFunction · 0.85
dStrlenFunction · 0.70
dSprintfFunction · 0.70
push_backMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected