MCPcopy Create free account
hub / github.com/OpenMW/openmw / getLocalPath

Method getLocalPath

components/files/linuxpath.cpp:78–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 }
77
78 std::filesystem::path LinuxPath::getLocalPath() const
79 {
80 auto localPath = std::filesystem::current_path() / "";
81
82 static const std::filesystem::path statusPaths[]
83 = { "/proc/self/exe", "/proc/self/file", "/proc/curproc/exe", "/proc/curproc/file" };
84
85 for (const auto& path : statusPaths)
86 {
87 std::error_code ec;
88 const auto binPath = read_symlink(path, ec);
89 if (ec.value() != -1)
90 {
91 localPath = binPath.parent_path() / "";
92 break;
93 }
94 }
95
96 return localPath;
97 }
98
99 std::filesystem::path LinuxPath::getGlobalDataPath() const
100 {

Callers 6

readConfigurationMethod · 0.45
FixedPathMethod · 0.45
populateLoadedConfigsMethod · 0.45
TESTFunction · 0.45
prepareEngineMethod · 0.45

Calls 1

valueMethod · 0.45

Tested by 1

TESTFunction · 0.36