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

Function IsDiskPathRoot

internal/tspath/path.go:42–45  ·  view source on GitHub ↗

Determines whether a path consists only of a path root.

(path string)

Source from the content-addressed store, hash-verified

40
41// Determines whether a path consists only of a path root.
42func IsDiskPathRoot(path string) bool {
43 rootLength := GetEncodedRootLength(path)
44 return rootLength > 0 && rootLength == len(path)
45}
46
47// IsDynamicFileName returns true if the file name represents a dynamic/virtual file
48// that doesn't exist on disk (e.g., untitled files with paths like "^/untitled/...").

Callers

nothing calls this directly

Calls 2

GetEncodedRootLengthFunction · 0.85
lenFunction · 0.85

Tested by

no test coverage detected