MCPcopy Create free account
hub / github.com/tailscale/tailscale / IsRoot

Function IsRoot

drive/driveimpl/shared/pathutil.go:67–69  ·  view source on GitHub ↗

IsRoot determines whether a given path p is the root path, defined as either empty or "/".

(p string)

Source from the content-addressed store, hash-verified

65// IsRoot determines whether a given path p is the root path, defined as either
66// empty or "/".
67func IsRoot(p string) bool {
68 return p == "" || p == sepString
69}
70
71// Base is like path.Base except that it returns "" for the root folder
72func Base(p string) string {

Callers 6

shouldDelegateToChildFunction · 0.92
MkdirMethod · 0.92
trimStaticRootMethod · 0.92
OpenFileMethod · 0.92
StatMethod · 0.92
BaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…