MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / getParentDir

Function getParentDir

src/utils/colmapPathResolver.ts:24–28  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

22type ColmapDirectory = Partial<Record<ColmapRole, string>>;
23
24export function getParentDir(path: string): string {
25 const normalized = path.replace(/\\/g, '/');
26 const lastSlash = normalized.lastIndexOf('/');
27 return lastSlash >= 0 ? normalized.substring(0, lastSlash) : '';
28}
29
30export function getBasename(path: string): string {
31 const normalized = path.replace(/\\/g, '/');

Callers 4

resolveFunction · 0.90
resolveColmapPathsFunction · 0.85
getImagesDirScoreFunction · 0.85
resolveImagesDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected