MCPcopy Index your code
hub / github.com/redspread/spread / pathExists

Function pathExists

cli/cli.go:106–115  ·  view source on GitHub ↗
(path string, dir bool)

Source from the content-addressed store, hash-verified

104}
105
106func pathExists(path string, dir bool) (bool, error) {
107 info, err := os.Stat(path)
108 if err == nil {
109 return info.IsDir() == dir, nil
110 }
111 if os.IsNotExist(err) {
112 return false, nil
113 }
114 return true, err
115}
116
117var (
118 // ErrNoWorkDir is returned when the CLI was started without a working directory set.

Callers 1

findPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected