MCPcopy Create free account
hub / github.com/TurningWheel/Barony / physfsGetFileNamesInDirectory

Function physfsGetFileNamesInDirectory

src/files.cpp:3885–3904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3883}
3884
3885std::list<std::string> physfsGetFileNamesInDirectory(const char* dir)
3886{
3887 std::list<std::string> filenames;
3888 char **rc = PHYSFS_enumerateFiles(dir);
3889 if ( rc == NULL )
3890 {
3891 printlog("[PhysFS]: Error: Failed to enumerate filenames in directory '%s': %s", dir, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
3892 return filenames;
3893 }
3894 char **i;
3895 std::string file;
3896 for ( i = rc; *i != NULL; i++ )
3897 {
3898 file = *i;
3899 //printlog(" * We've got [%s].\n", file.c_str());
3900 filenames.push_back(file);
3901 }
3902 PHYSFS_freeList(rc);
3903 return filenames;
3904}
3905
3906std::string physfsFormatMapName(char const * const levelfilename)
3907{

Callers 3

getListOfBooksFunction · 0.85
readAllStatuesMethod · 0.85
readAllScriptsMethod · 0.85

Calls 1

printlogFunction · 0.85

Tested by

no test coverage detected