kubeedge/pkg/util/validation/check.go
2020-05-01 00:20:44 +08:00

14 lines
195 B
Go

package validation
import (
"os"
)
// FileIsExist check file is exist
func FileIsExist(path string) bool {
_, err := os.Stat(path)
if err == nil {
return true
}
return os.IsExist(err)
}