1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-05 10:20:53 +02:00
go-micro/util/file/file.go

16 lines
247 B
Go
Raw Normal View History

2019-05-31 00:52:10 +02:00
package file
import "os"
// Exists returns true if the path is existing
func Exists(path string) (bool, error) {
_, err := os.Stat(path)
if err == nil {
return true, nil
}
if os.IsNotExist(err) {
return false, nil
}
return true, err
}