Documentation ¶
Overview ¶
Package dir has been designed to list files within a certain directory excluding files from ignore list.
Index ¶
- type Controller
- type Dir
- func (d *Dir) AbsPath() string
- func (d *Dir) Base() string
- func (d *Dir) Dir() string
- func (d *Dir) Ignore() []string
- func (d *Dir) IsPathIgnored(path string) bool
- func (d *Dir) ListFiles(ext ...string) (path []string, size int64, err error)
- func (d *Dir) RelPath() string
- func (d *Dir) SetIgnore(ignore []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { SetIgnore([]string) Ignore() []string AbsPath() string RelPath() string Base() string Dir() string IsPathIgnored(string) bool ListFiles(...string) ([]string, int64, error) }
Controller is the interface that wraps the Dir methods.
type Dir ¶
type Dir struct {
// contains filtered or unexported fields
}
Dir represents a working directory.
func (*Dir) IsPathIgnored ¶
IsPathIgnored checks if the provided path is ignored based on ignore.
Click to show internal directories.
Click to hide internal directories.