MCPcopy Create free account
hub / github.com/microsoft/typescript-go / getRelativePathIfInSameVolume

Function getRelativePathIfInSameVolume

internal/modulespecifiers/util.go:240–249  ·  view source on GitHub ↗
(path string, directoryPath string, useCaseSensitiveFileNames bool)

Source from the content-addressed store, hash-verified

238}
239
240func getRelativePathIfInSameVolume(path string, directoryPath string, useCaseSensitiveFileNames bool) string {
241 relativePath := tspath.GetRelativePathToDirectoryOrUrl(directoryPath, path, false, tspath.ComparePathsOptions{
242 UseCaseSensitiveFileNames: useCaseSensitiveFileNames,
243 CurrentDirectory: directoryPath,
244 })
245 if tspath.IsRootedDiskPath(relativePath) {
246 return ""
247 }
248 return relativePath
249}
250
251func packageJsonPathsAreEqual(a string, b string, options tspath.ComparePathsOptions) bool {
252 if a == b {

Callers 3

getLocalModuleSpecifierFunction · 0.85

Calls 2

IsRootedDiskPathFunction · 0.92

Tested by

no test coverage detected