MCPcopy Index your code
hub / github.com/xintaofei/codeg / isAbsoluteFilePath

Function isAbsoluteFilePath

src/lib/file-path-display.ts:41–44  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

39
40/** True when a path is absolute (POSIX `/…` or Windows `C:\…` / `C:/…`). */
41export function isAbsoluteFilePath(path: string): boolean {
42 const normalized = normalizeSlashPath(path)
43 return normalized.startsWith("/") || WINDOWS_ABSOLUTE_PATH.test(normalized)
44}
45
46/**
47 * Resolve a session file path to an absolute filesystem path for reveal-in-

Callers 7

isSelfLocatingPathFunction · 0.90
splitAbsPathFunction · 0.90
isPathUnderRootFunction · 0.90
findOwningFolderFunction · 0.90
WorkspaceProviderFunction · 0.90
toAbsoluteFilePathFunction · 0.85

Calls 1

normalizeSlashPathFunction · 0.70

Tested by

no test coverage detected