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