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

Function startsWithDirectory

test/fixtures/snapshot/typescript.js:8145–8149  ·  view source on GitHub ↗

* Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. * Comparison is case-sensitive between the canonical paths. * * Use `containsPath` if file names are not already reduced and absolute.

(fileName, directoryName, getCanonicalFileName)

Source from the content-addressed store, hash-verified

8143 * Use `containsPath` if file names are not already reduced and absolute.
8144 */
8145 function startsWithDirectory(fileName, directoryName, getCanonicalFileName) {
8146 var canonicalFileName = getCanonicalFileName(fileName);
8147 var canonicalDirectoryName = getCanonicalFileName(directoryName);
8148 return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\");
8149 }
8150 ts.startsWithDirectory = startsWithDirectory;
8151 //// Relative Paths
8152 function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) {

Callers

nothing calls this directly

Calls 1

getCanonicalFileNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…