MCPcopy
hub / github.com/dosco/graphjin / List

Method List

wasm/fs.go:95–109  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

93}
94
95func (f *JSFS) List(path string) (entries []string, err error) {
96 path = filepath.Join(f.bp, path)
97 defer func() {
98 if err1 := recover(); err1 != nil {
99 err = toError(err1)
100 }
101 }()
102 result := f.fs.Call("readdirSync", path)
103 length := result.Get("length").Int()
104 entries = make([]string, length)
105 for i := 0; i < length; i++ {
106 entries[i] = result.Index(i).String()
107 }
108 return entries, nil
109}

Callers

nothing calls this directly

Calls 4

toErrorFunction · 0.85
CallMethod · 0.65
GetMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected