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

Function FiosGetTownDataList

src/fios.cpp:564–575  ·  view source on GitHub ↗

* Get a list of town data files. * @param fop Purpose of collecting the list. * @param show_dirs Whether to show directories. * @param file_list Destination of the found files. */

Source from the content-addressed store, hash-verified

562 * @param file_list Destination of the found files.
563 */
564void FiosGetTownDataList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
565{
566 static std::optional<std::string> fios_town_data_path;
567
568 if (!fios_town_data_path) fios_town_data_path = FioFindDirectory(HEIGHTMAP_DIR);
569
570 _fios_path = &(*fios_town_data_path);
571
572 std::string base_path = FioFindDirectory(HEIGHTMAP_DIR);
573 Subdirectory subdir = base_path == *_fios_path ? HEIGHTMAP_DIR : NO_DIRECTORY;
574 FiosGetFileList(fop, show_dirs, &FiosGetTownDataListCallback, subdir, file_list);
575}
576
577/**
578 * Get the directory for screenshots.

Callers 1

BuildFileListMethod · 0.85

Calls 2

FioFindDirectoryFunction · 0.85
FiosGetFileListFunction · 0.85

Tested by

no test coverage detected