package ec2macossystemmonitor import ( "os" ) // fileExists returns true if a file exists and is not a directory. func fileExists(filename string) bool { info, err := os.Stat(filename) if os.IsNotExist(err) { return false } return !info.IsDir() }