goext/langext/os.go

12 lines
169 B
Go
Raw Permalink Normal View History

2022-10-27 16:48:26 +02:00
package langext
import "os"
func FileExists(filename string) bool {
info, err := os.Stat(filename)
if os.IsNotExist(err) {
return false
}
return !info.IsDir()
}