MCPcopy Create free account
hub / github.com/cli/cli / hasTrailingPathSeparator

Function hasTrailingPathSeparator

internal/safepaths/root.go:482–484  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

480}
481
482func hasTrailingPathSeparator(path string) bool {
483 return len(path) > 0 && os.IsPathSeparator(path[len(path)-1])
484}
485
486func trailingPathSeparatorError(path string) error {
487 return &os.PathError{Op: "open", Path: path, Err: fmt.Errorf("file path ends in a separator")}

Callers 2

OpenFileFunction · 0.85
CreateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected