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

Function SplitVolumePath

internal/tspath/path.go:1093–1098  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

1091}
1092
1093func SplitVolumePath(path string) (volume string, rest string, ok bool) {
1094 if len(path) >= 2 && IsVolumeCharacter(path[0]) && path[1] == ':' {
1095 return strings.ToLower(path[0:2]), path[2:], true
1096 }
1097 return "", path, false
1098}
1099
1100// GetCommonParents returns the smallest set of directories that are parents of all paths with
1101// at least `minComponents` directory components. Any path that has fewer than `minComponents` directory components

Callers 2

fixWindowsURIPathFunction · 0.92
FileNameToDocumentURIFunction · 0.92

Calls 2

lenFunction · 0.85
IsVolumeCharacterFunction · 0.85

Tested by

no test coverage detected