Esempio n. 1
0
// DefaultIgnorePathFn checks whether a path is ignored. Currently defaults
// to hidden files on *nix systems, ie they start with a ".".
func DefaultIgnorePathFn(path string) bool {
	if strings.HasPrefix(path, ".") || strings.Contains(path, "/.") {
		return true
	}

	// ignore node
	if strings.HasPrefix(path, "node_modules") || strings.Contains(path, "/node_modules") {
		return true
	}

	// vim creates random numeric files
	base := filepath.Base(path)
	if str.IsNumeric(base) {
		return true
	}
	return false
}
Esempio n. 2
0
File: watcher.go Progetto: THEY/godo
func isVimFile(path string) bool {
	base := filepath.Base(path)
	return str.IsNumeric(base)
}