mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
ed5d617cb9
* move grabpl verify-drone
17 lines
271 B
Go
17 lines
271 B
Go
package fsutil
|
|
|
|
import "os"
|
|
|
|
// Exists determines whether a file/directory exists or not.
|
|
func Exists(fpath string) (bool, error) {
|
|
_, err := os.Stat(fpath)
|
|
if err != nil {
|
|
if !os.IsNotExist(err) {
|
|
return false, err
|
|
}
|
|
return false, nil
|
|
}
|
|
|
|
return true, nil
|
|
}
|