MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / find

Method find

src/Core/System/Path.cpp:60–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 std::string Path::find(PathType pathType) const
61 {
62 for (const MountablePath& mountedPath : m_mounts)
63 {
64 if ((pathType == PathType::All || pathType == PathType::File)
65 && Utils::File::fileExists(mountedPath.basePath
66 + ((!mountedPath.basePath.empty()) ? "/" : "") + this->m_path))
67 {
68 return mountedPath.basePath + ((!mountedPath.basePath.empty()) ? "/" : "")
69 + this->m_path;
70 }
71 else if ((pathType == PathType::All || pathType == PathType::Directory)
72 && Utils::File::directoryExists(mountedPath.basePath
73 + ((!mountedPath.basePath.empty()) ? "/" : "") + this->m_path))
74 {
75 return mountedPath.basePath + ((!mountedPath.basePath.empty()) ? "/" : "")
76 + this->m_path;
77 }
78 }
79 return "";
80 }
81
82 std::vector<std::string> Path::findAll(PathType pathType) const
83 {

Callers 15

occurencesInStringFunction · 0.45
replaceInPlaceFunction · 0.45
replaceFunction · 0.45
containsFunction · 0.45
LoadClassPathFunction · 0.45
loadGameObjectMethod · 0.45
operator""_fsFunction · 0.45
findOptionOrDefaultFunction · 0.45
loadTextureMethod · 0.45
fromNameMethod · 0.45

Calls 3

fileExistsFunction · 0.85
directoryExistsFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected