MCPcopy Index your code
hub / github.com/TruthHun/BookStack / FileExists

Function FileExists

utils/file.go:34–41  ·  view source on GitHub ↗

FileExists reports whether the named file or directory exists.

(name string)

Source from the content-addressed store, hash-verified

32
33// FileExists reports whether the named file or directory exists.
34func FileExists(name string) bool {
35 if _, err := os.Stat(name); err != nil {
36 if os.IsNotExist(err) {
37 return false
38 }
39 }
40 return true
41}
42
43func CopyFile(dstName, srcName string) (written int64, err error) {
44 dstName = strings.TrimLeft(dstName, "./")

Callers 2

AttachDetailedMethod · 0.92
ResolveCommandFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected