| 44 | } |
| 45 | |
| 46 | Path Path::getPath(const std::size_t index) const |
| 47 | { |
| 48 | if (index < m_mounts.size()) |
| 49 | return Path(m_mounts[index].basePath).add(m_path); |
| 50 | std::vector<std::string> mountNames; |
| 51 | mountNames.reserve(m_mounts.size()); |
| 52 | for (const auto& mount : m_mounts) |
| 53 | { |
| 54 | mountNames.push_back(mount.basePath); |
| 55 | } |
| 56 | throw Exceptions::MountablePathIndexOverflow( |
| 57 | index, m_mounts.size(), mountNames, EXC_INFO); |
| 58 | } |
| 59 | |
| 60 | std::string Path::find(PathType pathType) const |
| 61 | { |