| 147 | } |
| 148 | |
| 149 | std::filesystem::path GetPathBaseName(const std::filesystem::path& path) { |
| 150 | const std::filesystem::path fs_path(NormalizePath(path)); |
| 151 | if (fs_path.has_filename()) { |
| 152 | return fs_path.filename(); |
| 153 | } else { // It is a directory. |
| 154 | return fs_path.parent_path().filename(); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | std::filesystem::path GetParentDir(const std::filesystem::path& path) { |
| 159 | return path.parent_path(); |