Codechange: Use directory_iterator in ScanPath.

Replaces use of custom ttd_opendir.
This commit is contained in:
Peter Nelson
2024-04-18 00:04:46 +01:00
committed by Peter Nelson
parent d7c547d0db
commit 42523379d9
3 changed files with 27 additions and 39 deletions

View File

@@ -42,8 +42,8 @@ public:
/** Destruct the proper one... */
virtual ~FileScanner() = default;
uint Scan(const char *extension, Subdirectory sd, bool tars = true, bool recursive = true);
uint Scan(const char *extension, const std::string &directory, bool recursive = true);
uint Scan(std::string_view extension, Subdirectory sd, bool tars = true, bool recursive = true);
uint Scan(std::string_view extension, const std::string &directory, bool recursive = true);
/**
* Add a file with the given filename.