Documentation ¶
Overview ¶
Package filter implements Accept/Reject filtering of file.Names.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter filenames by the accept/reject regexs.
func New ¶
New returns a new *Filter.
If accept is a non-empty regex string and it matches the filename then file will be processed. Leave the empty string to accept all files.
If reject is a non-empty regex string and it matches the filename then the file will be ignored. Leave the empty string to disable rejection.
If both regexs are set and either causes a file to be rejected then the file will be rejected.
Click to show internal directories.
Click to hide internal directories.