Documentation ¶
Index ¶
- func NoOpExclusion(_ string) bool
- type DirectoryView
- func NewDirectory(rootDir string) (DirectoryView, error)
- func NewDirectoryWithExclusion(rootDir string, fileExclusionFunc FileExclusionFunc) (DirectoryView, error)
- func NewFile(path string) (DirectoryView, error)
- func NewFileWithExclusion(path string, fileExclusionFunc FileExclusionFunc) (DirectoryView, error)
- type FileExclusionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoOpExclusion ¶
Types ¶
type DirectoryView ¶
DirectoryView is an object that provides methods to list files within the directory and to get the directory path itself. Dir should return the whole path to the directory, and Files should return only filenames that exist within given directory.
func NewDirectory ¶
func NewDirectory(rootDir string) (DirectoryView, error)
NewDirectory creates DirectoryView of given directory providing the directory path and filenames that are inside the directory.
func NewDirectoryWithExclusion ¶
func NewDirectoryWithExclusion(rootDir string, fileExclusionFunc FileExclusionFunc) (DirectoryView, error)
NewDirectoryWithExclusion creates DirectoryView of given directory providing the directory path and filenames that are inside the directory. It uses FileExclusionFunc to exclude files that are undesirable in the final view.
func NewFile ¶
func NewFile(path string) (DirectoryView, error)
NewFile creates DirectoryView of file providing its parent dir and single-item list with the given file.
func NewFileWithExclusion ¶
func NewFileWithExclusion(path string, fileExclusionFunc FileExclusionFunc) (DirectoryView, error)
NewFileWithExclusion creates DirectoryView and uses FileExclusionFunc to exclude file if it is undesirable in the final view, thus the final view may be empty.