MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / toRelativePath

Function toRelativePath

src/utils/path.ts:111–114  ·  view source on GitHub ↗
(filePath: string, cwd: string)

Source from the content-addressed store, hash-verified

109}
110
111export const toRelativePath = (filePath: string, cwd: string) => {
112 const relativePath = path.relative(cwd, filePath).toPosix()
113 return filePath.endsWith("/") ? relativePath + "/" : relativePath
114}
115
116/**
117 * Strategy used to resolve the workspace root in a multi-root workspace.

Callers 2

getOpenedTabsInfoMethod · 0.90
workspaceDidUpdateMethod · 0.90

Calls 1

toPosixMethod · 0.65

Tested by

no test coverage detected