mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
12 lines
245 B
Go
12 lines
245 B
Go
package util
|
|
|
|
import "os"
|
|
|
|
// FileExists check if the file with the given path exits.
|
|
func FileExists(filename string) bool {
|
|
fi, err := os.Lstat(filename)
|
|
if fi != nil || (err != nil && !os.IsNotExist(err)) {
|
|
return true
|
|
}
|
|
return false
|
|
}
|