# GRFFileScanner Class Reference

Helper for scanning for files with GRF as extension. More...

Inheritance diagram for GRFFileScanner:

## Public Member Functions
bool | AddFile (const char *filename, size_t basepath_length)
| Add a file with the given filename.
## Static Public Member Functions
static uint | DoScan ()
| Do the scan for GRFs.

## Detailed Description

Helper for scanning for files with GRF as extension.

Definition at line 529 of file newgrf_config.cpp.

## Member Function Documentation

bool GRFFileScanner::AddFile | ( | const char * | filename,
|  | size_t | basepath_length |
| ) |  |  | `[virtual]`

Add a file with the given filename.

Parameters:

  | filename | the full path to the file to read
  | basepath_length | amount of characters to chop of before to get a filename relative to the search path.

Returns:
  true if the file is added.

Implements FileScanner.

Definition at line 541 of file newgrf_config.cpp.

References FillGRFDetails(), GRFConfig::GetName(), GRFIdentifier::grfid, GRFConfig::ident, GRFIdentifier::md5sum, and GRFConfig::next.

static uint GRFFileScanner::DoScan | ( |  | ) | `[inline, static]`

Do the scan for GRFs.

Definition at line 534 of file newgrf_config.cpp.

References DATA_DIR, and FileScanner::Scan().

Referenced by ScanNewGRFFiles().

The documentation for this class was generated from the following file:

- src/newgrf_config.cpp