MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / Exists

Function Exists

pkg/utils/file.go:88–95  ·  view source on GitHub ↗

Exists determine whether the file exists

(name string)

Source from the content-addressed store, hash-verified

86
87// Exists determine whether the file exists
88func Exists(name string) bool {
89 if _, err := os.Stat(name); err != nil {
90 if os.IsNotExist(err) {
91 return false
92 }
93 }
94 return true
95}
96
97// CreateNestedDirectory create nested directory
98func CreateNestedDirectory(path string) error {

Callers 7

InitMethod · 0.92
RemoveMethod · 0.92
getThumbMethod · 0.92
generateStrmFunction · 0.92
InitConfigFunction · 0.92
initDaemonFunction · 0.92
InitHostKeyFunction · 0.92

Calls 1

StatMethod · 0.45

Tested by

no test coverage detected