Skip to content
Permalink
544e1b8609
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (27 sloc) 463 Bytes
package filtering
import (
"os"
"path/filepath"
)
var IgnoredPaths = []string{
".git",
".hg",
".svn",
".DS_Store",
"__MACOSX",
"._*",
"Thumbs.db",
".itch",
}
// FilterPaths filters out known bad folder/files
// which butler should just ignore
func FilterPaths(fileInfo os.FileInfo) bool {
name := fileInfo.Name()
for _, pattern := range IgnoredPaths {
match, _ := filepath.Match(pattern, name)
if match {
return false
}
}
return true
}