MCPcopy Index your code
hub / github.com/microsoft/typescript-go / GetPathComponents

Function GetPathComponents

internal/tspath/path.go:133–136  ·  view source on GitHub ↗
(path string, currentDirectory string)

Source from the content-addressed store, hash-verified

131}
132
133func GetPathComponents(path string, currentDirectory string) []string {
134 path = CombinePaths(currentDirectory, path)
135 return pathComponents(path, GetRootLength(path))
136}
137
138func pathComponents(path string, rootLength int) []string {
139 root := path[:rootLength]

Calls 3

CombinePathsFunction · 0.85
GetRootLengthFunction · 0.85
pathComponentsFunction · 0.70

Tested by 2

TestGetPathComponentsFunction · 0.68
normalizePath_oldFunction · 0.68