MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ScanTar

Function ScanTar

src/fileio.cpp:1097–1104  ·  view source on GitHub ↗

* Scan the given tar and add graphics sets when it finds one. * @param fs the file scanner to scan for * @param extension the extension of files to search for. * @param tar the tar to search in. */

Source from the content-addressed store, hash-verified

1095 * @param tar the tar to search in.
1096 */
1097static uint ScanTar(FileScanner *fs, std::string_view extension, const TarFileList::value_type &tar)
1098{
1099 uint num = 0;
1100
1101 if (MatchesExtension(extension, tar.first) && fs->AddFile(tar.first, 0, tar.second.tar_filename)) num++;
1102
1103 return num;
1104}
1105
1106/**
1107 * Scan for files with the given extension in the given search path.

Callers 1

ScanMethod · 0.85

Calls 2

MatchesExtensionFunction · 0.85
AddFileMethod · 0.45

Tested by

no test coverage detected