Documentation
¶
Index ¶
- func FindAllFiles(path string, list []string) (chan SearchResult, error)
- func FindAllFilesExcept(path string, list, ignorePatterns []string) (chan SearchResult, error)
- func FindFiles(path string, list []string) (chan SearchResult, error)
- func FindFilesExcept(path string, list, ignorePatterns []string) (chan SearchResult, error)
- func GitRepoForPath(path string) (string, error)
- func IsPathInGit(path string) bool
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAllFiles ¶ added in v0.3.0
func FindAllFiles(path string, list []string) (chan SearchResult, error)
FindAllFiles finds all files from list in path. It does not respect any gitignore files.
func FindAllFilesExcept ¶ added in v0.3.0
func FindAllFilesExcept(path string, list, ignorePatterns []string) (chan SearchResult, error)
FindAllFilesExcept finds all files from list in path. It does not respect any gitignore files.
func FindFiles ¶
func FindFiles(path string, list []string) (chan SearchResult, error)
FindFiles finds files from list in path. It respects all .gitignores it finds while traversing paths.
func FindFilesExcept ¶ added in v0.2.0
func FindFilesExcept(path string, list, ignorePatterns []string) (chan SearchResult, error)
FindFilesExcept finds files from a list in a path, excluding any matches in a given set of ignore patterns. It also respects all .gitignores it finds while traversing paths.
func GitRepoForPath ¶
GitRepoForPath returns the directory of the git repository path is a member of, or an error.
func IsPathInGit ¶
IsPathInGit returns true when a path is part of a git repository.
Types ¶
type SearchResult ¶
SearchResult combines the absolute path of a file with a FileInfo struct.
func FindFirstFile ¶
func FindFirstFile(path string, list []string) (SearchResult, error)
FindFirstFile looks for files from a list in a path, returning the first match it finds. It respects all .gitignores it finds along the way.