OpenTTD Source 20241224-master-gee860a5c8e
|
Helper for creating a MD5sum of all files within of a script. More...
Public Member Functions | |
ScriptFileChecksumCreator (Subdirectory dir) | |
Initialise the md5sum to be all zeroes, so we can easily xor the data. | |
bool | AddFile (const std::string &filename, size_t, const std::string &) override |
Add a file 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. | |
Data Fields | |
MD5Hash | md5sum |
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. | |
Helper for creating a MD5sum of all files within of a script.
Definition at line 153 of file script_scanner.cpp.
|
inline |
Initialise the md5sum to be all zeroes, so we can easily xor the data.
Definition at line 161 of file script_scanner.cpp.
|
inlineoverridevirtual |
Add a file with the given filename.
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. |
Implements FileScanner.
Definition at line 164 of file script_scanner.cpp.
References FioFOpenFile().
Referenced by IsSameScript().
Subdirectory ScriptFileChecksumCreator::dir |
The directory to look in.
Definition at line 155 of file script_scanner.cpp.
MD5Hash ScriptFileChecksumCreator::md5sum |