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

Method List

pkg/storage/file.go:90–107  ·  view source on GitHub ↗
(ctx context.Context, u *URI)

Source from the content-addressed store, hash-verified

88}
89
90func (f *FileSystem) List(ctx context.Context, u *URI) ([]Info, error) {
91 entries, err := os.ReadDir(u.Filepath())
92 if err != nil {
93 return nil, fileErr(err)
94 }
95 infos := make([]Info, len(entries))
96 for i, e := range entries {
97 info, err := e.Info()
98 if err != nil {
99 return nil, err
100 }
101 infos[i] = Info{
102 Name: e.Name(),
103 Size: info.Size(),
104 }
105 }
106 return infos, nil
107}
108
109func (f *FileSystem) checkPath(path string) error {
110 dir := filepath.Dir(path)

Callers

nothing calls this directly

Calls 3

fileErrFunction · 0.85
SizeMethod · 0.65
FilepathMethod · 0.45

Tested by

no test coverage detected