MCPcopy
hub / github.com/aceld/zinx / PathExists

Function PathExists

zconf/zconf.go:126–135  ·  view source on GitHub ↗

PathExists Check if a file exists.(判断一个文件是否存在)

(path string)

Source from the content-addressed store, hash-verified

124
125// PathExists Check if a file exists.(判断一个文件是否存在)
126func PathExists(path string) (bool, error) {
127 _, err := os.Stat(path)
128 if err == nil {
129 return true, nil
130 }
131 if os.IsNotExist(err) {
132 return false, nil
133 }
134 return false, err
135}
136
137// Reload 读取用户的配置文件
138// This method is used to reload the configuration file.

Callers 1

ReloadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected