MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / isRelative

Function isRelative

cli/pkg/k8s/filespec.go:75–81  ·  view source on GitHub ↗
(base, target localPath)

Source from the content-addressed store, hash-verified

73}
74
75func isRelative(base, target localPath) bool {
76 relative, err := filepath.Rel(base.String(), target.String())
77 if err != nil {
78 return false
79 }
80 return relative == "." || relative == stripPathShortcuts(relative)
81}
82
83// remotePath represents always UNIX path, its methods will use path
84// package which is always using `/`

Callers

nothing calls this directly

Calls 2

stripPathShortcutsFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected