OpenTTD Source: ScriptFileChecksumCreator Struct Reference

OpenTTD Source 1.11.0-RC1

Public Member Functions | Data Fields
ScriptFileChecksumCreator Struct Reference

Helper for creating a MD5sum of all files within of a script. More...

Inheritance diagram for ScriptFileChecksumCreator:

## Public Member Functions
| ScriptFileChecksumCreator (Subdirectory dir)
| Initialise the md5sum to be all zeroes, so we can easily xor the data.
virtual bool | AddFile (const std::string &filename, size_t basepath_length, const std::string &tar_filename)
| Add a file with the given filename. More...
Public Member Functions inherited from FileScanner
virtual | ~FileScanner ()
| Destruct the proper one...
uint | Scan (const char *extension, Subdirectory sd, bool tars=true, bool recursive=true)
| Scan for files with the given extension in the given search path. More...
uint | Scan (const char *extension, const char *directory, bool recursive=true)
| Scan for files with the given extension in the given search path. More...

## Data Fields
byte | md5sum [16]
| The final md5sum.
Subdirectory | dir
| The directory to look in.

## Additional Inherited Members
Protected Attributes inherited from FileScanner
Subdirectory | subdir
| The current sub directory we are searching through.

## Detailed Description

Helper for creating a MD5sum of all files within of a script.

Definition at line 162 of file script_scanner.cpp.

## Member Function Documentation

## ◆ AddFile()

virtual bool ScriptFileChecksumCreator::AddFile | ( | const std::string & | filename,
|  | size_t | basepath_length,
|  | const std::string & | tar_filename
| ) |  |
| inlinevirtual

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.
  tar_filename | the name of the tar file the file is read from.

Returns
  true if the file is added.

Implements FileScanner.

Definition at line 177 of file script_scanner.cpp.

References FioFCloseFile(), and FioFOpenFile().

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

- src/script/script_scanner.cpp