MCPcopy
hub / github.com/claude-code-best/claude-code / getAbsoluteAndRelativePaths

Function getAbsoluteAndRelativePaths

src/utils/file.ts:144–153  ·  view source on GitHub ↗
(path: string | undefined)

Source from the content-addressed store, hash-verified

142}
143
144export function getAbsoluteAndRelativePaths(path: string | undefined): {
145 absolutePath: string | undefined
146 relativePath: string | undefined
147} {
148 const absolutePath = path ? expandPath(path) : undefined
149 const relativePath = absolutePath
150 ? relative(getCwd(), absolutePath)
151 : undefined
152 return { absolutePath, relativePath }
153}
154
155export function getDisplayPath(filePath: string): string {
156 // Use relative path if file is in the current working directory

Callers 1

getDisplayPathFunction · 0.85

Calls 2

expandPathFunction · 0.85
getCwdFunction · 0.85

Tested by

no test coverage detected