MCPcopy Create free account
hub / github.com/colmap/colmap / GetPathBaseName

Function GetPathBaseName

src/colmap/util/file.cc:149–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149std::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
158std::filesystem::path GetParentDir(const std::filesystem::path& path) {
159 return path.parent_path();

Callers 1

TESTFunction · 0.85

Calls 1

NormalizePathFunction · 0.85

Tested by 1

TESTFunction · 0.68