janwas
5c923bbe70
also accounts for new ERR_VFS_DIR_END code when checking errors This was SVN commit r1385.
18 lines
545 B
C++
Executable File
18 lines
545 B
C++
Executable File
#include "ps/CStr.h"
|
|
|
|
namespace VFSUtil
|
|
{
|
|
typedef std::vector<CStr> FileList;
|
|
|
|
// Puts the list of files inside 'dirname' matching 'filter' into 'files'.
|
|
// 'dirname' shouldn't end with a slash.
|
|
// 'filter' is as in vfs_next_dirent:
|
|
// - 0: any file;
|
|
// - "/": any subdirectory
|
|
// - anything else: pattern for name (may include '?' and '*' wildcards)
|
|
// 'files' is initially cleared, and undefined on failure.
|
|
// On failure, logs an error and returns false.
|
|
bool FindFiles(CStr dirname, const char* filter, FileList& files);
|
|
|
|
};
|