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

Method findAll

src/Core/System/Path.cpp:82–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 std::vector<std::string> Path::findAll(PathType pathType) const
83 {
84 std::vector<std::string> result;
85 for (const MountablePath& mountedPath : m_mounts)
86 {
87 if ((pathType == PathType::All || pathType == PathType::File)
88 && Utils::File::fileExists(mountedPath.basePath
89 + ((!mountedPath.basePath.empty()) ? "/" : "") + this->m_path))
90 {
91 result.push_back(mountedPath.basePath
92 + ((!mountedPath.basePath.empty()) ? "/" : "") + this->m_path);
93 }
94 else if ((pathType == PathType::All || pathType == PathType::Directory)
95 && Utils::File::directoryExists(mountedPath.basePath
96 + ((!mountedPath.basePath.empty()) ? "/" : "") + this->m_path))
97 {
98 result.push_back(mountedPath.basePath
99 + ((!mountedPath.basePath.empty()) ? "/" : "") + this->m_path);
100 }
101 }
102 return result;
103 }
104
105 std::string Path::toString() const
106 {

Callers 2

loadMethod · 0.80
LoadClassPathFunction · 0.80

Calls 4

fileExistsFunction · 0.85
directoryExistsFunction · 0.85
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected