MCPcopy Create free account
hub / github.com/brimdata/super / Exists

Method Exists

pkg/storage/file.go:79–88  ·  view source on GitHub ↗
(_ context.Context, u *URI)

Source from the content-addressed store, hash-verified

77}
78
79func (f *FileSystem) Exists(_ context.Context, u *URI) (bool, error) {
80 _, err := os.Stat(u.Filepath())
81 if os.IsNotExist(err) {
82 return false, nil
83 }
84 if err != nil {
85 return false, fileErr(err)
86 }
87 return true, nil
88}
89
90func (f *FileSystem) List(ctx context.Context, u *URI) ([]Info, error) {
91 entries, err := os.ReadDir(u.Filepath())

Callers

nothing calls this directly

Calls 2

fileErrFunction · 0.85
FilepathMethod · 0.45

Tested by

no test coverage detected