MCPcopy Index your code
hub / github.com/nodejs/node / convertToRelativePath

Function convertToRelativePath

test/fixtures/snapshot/typescript.js:8182–8186  ·  view source on GitHub ↗
(absoluteOrRelativePath, basePath, getCanonicalFileName)

Source from the content-addressed store, hash-verified

8180 }
8181 ts.getRelativePathFromDirectory = getRelativePathFromDirectory;
8182 function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) {
8183 return !isRootedDiskPath(absoluteOrRelativePath)
8184 ? absoluteOrRelativePath
8185 : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
8186 }
8187 ts.convertToRelativePath = convertToRelativePath;
8188 function getRelativePathFromFile(from, to, getCanonicalFileName) {
8189 return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName));

Callers

nothing calls this directly

Calls 2

isRootedDiskPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…