OpenTTD Source
1.11.0-beta2
|
File list storage for the console, for caching the last 'ls' command. More...
Public Member Functions | |
void | InvalidateFileList () |
Declare the file storage cache as being invalid, also clears all stored files. | |
void | ValidateFileList (bool force_reload=false) |
(Re-)validate the file storage cache. More... | |
![]() | |
FiosItem * | Append () |
Construct a new entry in the file list. More... | |
size_t | Length () const |
Get the number of files in the list. More... | |
const FiosItem * | Begin () const |
Get a pointer to the first file information. More... | |
const FiosItem * | End () const |
Get a pointer behind the last file information. More... | |
const FiosItem * | Get (size_t index) const |
Get a pointer to the indicated file information. More... | |
FiosItem * | Get (size_t index) |
Get a pointer to the indicated file information. More... | |
const FiosItem & | operator[] (size_t index) const |
FiosItem & | operator[] (size_t index) |
Get a reference to the indicated file information. More... | |
void | Clear () |
Remove all items from the list. | |
void | Compact () |
Compact the list down to the smallest block size boundary. | |
void | BuildFileList (AbstractFileType abstract_filetype, SaveLoadOperation fop) |
Construct a file list with the given kind of files, for the stated purpose. More... | |
const FiosItem * | FindItem (const char *file) |
Find file information of a file by its name from the file list. More... | |
Data Fields | |
bool | file_list_valid |
If set, the file list is valid. | |
![]() | |
std::vector< FiosItem > | files |
The list of files. | |
File list storage for the console, for caching the last 'ls' command.
Definition at line 51 of file console_cmds.cpp.
|
inline |
(Re-)validate the file storage cache.
Only makes a change if the storage was invalid, or if force_reload.
force_reload | Always reload the file storage cache. |
Definition at line 69 of file console_cmds.cpp.
References FileList::BuildFileList(), file_list_valid, FT_SAVEGAME, and SLO_LOAD.