Documentation ¶
Overview ¶
Package files contains functions and types that help with file and directory processing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotDirectory error
)
Errors returned by the files packages
Functions ¶
func GetFileMd5 ¶
Types ¶
type DirMode ¶
type DirMode uint32
A DirMode represents flags that define the behavior of the DirReader.
type DirReader ¶
type DirReader struct { Filter Filter // contains filtered or unexported fields }
A DirReader iterates through the files and subdirectories contained within a directory.
func NewDirReader ¶
NewDirReader creates a DirReader rooted at the specified directory.
type Filter ¶
A Filter interface is used to define rules to include or exclude a file in the results of a Next() iteration.
func DirFilter ¶
func DirFilter() Filter
DirFilter creates a filter that accepts only directories (not files).
func FileFilter ¶
func FileFilter() Filter
FileFilter creates a filter that accepts only files (not directories).
func MultiFilter ¶
MultiFilter creates a filter composed of several other filters.
func RegexpFilter ¶
RegexpFilter creates a filter that returns true when the regular expression matches the file's full path.