func matchingFileOrDir(file string, pattern string) bool { if fileutil.IsFile(file) { _, f := path.Split(file) isMatch, _ := path.Match(pattern, f) return isMatch } else { return fileutil.MatchExists(path.Join(file, pattern)) } }
func hasFile(fileOrDir string, file string) bool { return fileutil.IsFile(fileutil.Join(fileOrDir, file)) }