| 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 | { |
no test coverage detected