1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Convert FileEnumerator to IFileScanner

This commit is contained in:
Ted John
2016-10-22 19:10:16 +01:00
parent a17748eb41
commit 16626eabb8
5 changed files with 174 additions and 152 deletions

View File

@@ -246,13 +246,14 @@ private:
String::Set(pattern, sizeof(pattern), directory);
Path::Append(pattern, sizeof(pattern), "*.sc6");
auto fileEnumerator = FileEnumerator(pattern, true);
while (fileEnumerator.Next())
IFileScanner * scanner = Path::ScanDirectory(pattern, true);
while (scanner->Next())
{
auto path = fileEnumerator.GetPath();
auto fileInfo = fileEnumerator.GetFileInfo();
auto path = scanner->GetPath();
auto fileInfo = scanner->GetFileInfo();
AddScenario(path, fileInfo->last_modified);
}
delete scanner;
}
void AddScenario(const utf8 * path, uint64 timestamp)