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

Method AddFile

src/fileio.cpp:419–423  ·  view source on GitHub ↗

* Add a single file to the scanned files of a tar, circumventing the scanning code. * @param sd The sub directory the file is in. * @param filename The name of the file to add. * @return True if the additions went correctly. */

Source from the content-addressed store, hash-verified

417 * @return True if the additions went correctly.
418 */
419bool TarScanner::AddFile(Subdirectory sd, const std::string &filename)
420{
421 this->subdir = sd;
422 return this->AddFile(filename, 0);
423}
424
425/**
426 * Helper to extract a string for the tar header. We must assume that the tar

Callers 2

ScanPathFunction · 0.45
ScanTarFunction · 0.45

Calls 11

pathClass · 0.85
SimplifyFileNameFunction · 0.85
ExtractStringFunction · 0.85
AlignFunction · 0.85
FS2OTTDFunction · 0.70
OTTD2FSFunction · 0.70
sizeFunction · 0.50
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected