MCPcopy Create free account
hub / github.com/DFHack/dfhack / getBaseDir

Method getBaseDir

library/modules/Filesystem.cpp:252–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252std::filesystem::path Filesystem::getBaseDir() noexcept
253{
254 auto getsavebase = []() {
255 // assume portable mode is _on_ if init is missing
256 if (!df::global::init || df::global::init->media.flag.is_set(df::enums::init_media_flags::PORTABLE_MODE))
257 return DFSDL::DFSDL_GetBasePath();
258 else
259 return DFSDL::DFSDL_GetPrefPath("Bay 12 Games", "Dwarf Fortress");
260 };
261 return std::filesystem::path{ getsavebase() };
262}

Callers

nothing calls this directly

Calls 1

is_setMethod · 0.80

Tested by

no test coverage detected