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

Method exists

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

Source from the content-addressed store, hash-verified

67}
68
69func (f *JSFS) exists(path string) (ok bool, err error) {
70 defer func() {
71 if err1 := recover(); err1 != nil {
72 err2 := toError(err1)
73 if strings.HasPrefix(err2.Error(), "ENOENT:") {
74 ok = false
75 } else {
76 err = err2
77 }
78 }
79 }()
80 f.fs.Call("statSync", path)
81 return
82}
83
84func (f *JSFS) createDir(path string) (err error) {
85 defer func() {

Callers 2

PutMethod · 0.95
ExistsMethod · 0.95

Calls 3

toErrorFunction · 0.85
ErrorMethod · 0.65
CallMethod · 0.65

Tested by

no test coverage detected