|
OpenTTD Source 20260206-master-g4d4e37dbf1
|
Scanner to scan for a particular type of FIOS file. More...
Public Member Functions | |
| FiosFileScanner (SaveLoadOperation fop, FiosGetTypeAndNameProc *callback_proc, FileList &file_list) | |
| Create the scanner. | |
| bool | AddFile (const std::string &filename, size_t, const std::string &) override |
| Try to add a fios item set with the given filename. | |
| Public Member Functions inherited from FileScanner | |
| virtual | ~FileScanner ()=default |
| Destruct the proper one... | |
| uint | Scan (std::string_view extension, Subdirectory sd, bool tars=true, bool recursive=true) |
| Scan for files with the given extension in the given search path. | |
| uint | Scan (std::string_view extension, const std::string &directory, bool recursive=true) |
| Scan for files with the given extension in the given search path. | |
Private Attributes | |
| SaveLoadOperation | fop |
| The kind of file we are looking for. | |
| FiosGetTypeAndNameProc * | callback_proc |
| Callback to check whether the file may be added. | |
| FileList & | file_list |
| Destination of the found files. | |
Additional Inherited Members | |
| Protected Attributes inherited from FileScanner | |
| Subdirectory | subdir {} |
| The current sub directory we are searching through. | |
|
inline |
Create the scanner.
| fop | Purpose of collecting the list. |
| callback_proc | The function that is called where you need to do the filtering. |
| file_list | Destination of the found files. |
Definition at line 246 of file fios.cpp.
References callback_proc, file_list, and fop.
|
overridevirtual |
Try to add a fios item set with the given filename.
| filename | the full path to the file to read |
Implements FileScanner.
Definition at line 258 of file fios.cpp.
References callback_proc, file_list, fop, GetEncodedString(), OTTD2FS(), and StrMakeValid().
|
private |
Callback to check whether the file may be added.
Definition at line 237 of file fios.cpp.
Referenced by AddFile(), and FiosFileScanner().
|
private |
Destination of the found files.
Definition at line 238 of file fios.cpp.
Referenced by AddFile(), and FiosFileScanner().
|
private |
The kind of file we are looking for.
Definition at line 236 of file fios.cpp.
Referenced by AddFile(), and FiosFileScanner().