package fileutil import "os" // FileExists checks if the file exists in the provided path. func FileExists(filename string) bool { info, err := os.Stat(filename) if os.IsNotExist(err) { return false } if err != nil { return false } return !info.IsDir() }