Documentation ¶
Index ¶
- func BinaryFileFilter(path, fileName string) bool
- func DefaultDirectoryFilter(path, dirName string) bool
- func DefaultFileFilter(path, fileName string) bool
- func DirToArray(dir string, followSyms bool, fileFilter func(string, string) bool, ...) []string
- func FilterExtBlacklist(ext, files []string) []string
- func FilterExtWhitelist(ext, files []string) []string
- func FilterOutBinaries(files []string) []string
- func FilterOutSymlinks(files []string) []string
- func IsBinaryData(b []byte) bool
- func IsBinaryFile(fileName string) bool
- func IsDir(fileName string) bool
- func IsFile(fileName string) bool
- func IsSymlink(fileName string) bool
- func SymlinkFileFilter(path, fileName string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryFileFilter ¶
BinaryFileFilter excludes binary files.
func DefaultDirectoryFilter ¶
DefaultDirectoryFilter returns true if the file should be kept, false if it should be discarded.
func DefaultFileFilter ¶
DefaultFileFilter excludes symlinks and binary files.
func DirToArray ¶
func DirToArray(dir string, followSyms bool, fileFilter func(string, string) bool, dirFilter func(string, string) bool) []string
DirToArray will flatten a directory into a simple list of files that can be iterated over.
func FilterExtBlacklist ¶
FilterExtBlacklist removes any files where the extension is found in the extension list.
func FilterExtWhitelist ¶
FilterExtWhitelist removes any files where the extension is not found in the extension list.
func FilterOutBinaries ¶
FilterOutBinaries removes any binary files from the given file list.
func FilterOutSymlinks ¶
FilterOutSymlinks removes any symlink files from the given file list.
func IsBinaryData ¶
IsBinaryData attemtpts to determine whether a given byte slice contains binary data.
func IsBinaryFile ¶
IsBinaryFile attemtpts to determine whether a file is a binary file.
func SymlinkFileFilter ¶
SymlinkFileFilter excludes symlinks and binary files.
Types ¶
This section is empty.