Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void GameAssetSelector::UpdateGameAssetsList(void)
- {
- // Get File Sysstem
- FileSystem * currentFileSystem = g_pApp->GetFileSystem();
- // String Results
- Vector<String> dirs;
- Vector<String> gameAssetResource;
- // Get filesystem directory
- String currentPath = currentFileSystem->GetProgramDir()+"GameData/GameAssets/";
- // Get current path for all xml files
- currentFileSystem->ScanDir(dirs, currentPath, "*", SCAN_DIRS, true);
- if(dirs.Size())
- {
- for(unsigned int currentDir=0; currentDir<dirs.Size(); currentDir++)
- {
- Vector <String> dirFiles;
- // remove garbage directories
- if (dirs.At(currentDir).EndsWith("."))
- continue;
- currentFileSystem->ScanDir(dirFiles, currentPath+dirs.At(currentDir)+"/", "*.xml", SCAN_FILES, false);
- if(dirFiles.Size())
- {
- // loop through each file listing
- for(unsigned int fileListing = 0; fileListing<dirFiles.Size(); fileListing++)
- {
- gameAssetResource.Push(dirFiles.At(fileListing));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment