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

Function ConPrintWorkingDirectory

src/console_cmds.cpp:644–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644static bool ConPrintWorkingDirectory(std::span<std::string_view> argv)
645{
646 if (argv.empty()) {
647 IConsolePrint(CC_HELP, "Print out the current working directory. Usage: 'pwd'.");
648 return true;
649 }
650
651 /* XXX - Workaround for broken file handling */
652 _console_file_list_savegame.ValidateFileList(true);
653 _console_file_list_savegame.InvalidateFileList();
654
655 IConsolePrint(CC_DEFAULT, FiosGetCurrentPath());
656 return true;
657}
658
659static bool ConClearBuffer(std::span<std::string_view> argv)
660{

Callers

nothing calls this directly

Calls 5

FiosGetCurrentPathFunction · 0.85
ValidateFileListMethod · 0.80
InvalidateFileListMethod · 0.80
IConsolePrintFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected