Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSOption ¶
type FSOption func(fp *FSProvider) error
func WithDefaults ¶
func WithDefaults() FSOption
WithDefaults adds the JPG, JPEG and PNG extensions and sets the working directory to the CWD.
func WithExtensions ¶
WithExtensions adds supported extensions. Note that for an image extension to be decode-able it must be imported (for side effects) by a built package. The following extensions are supported by default, but must be enabled individually:
- PNG
- JPG
- GIF
func WithFilter ¶
WithFilter adds a regex filter to the file search. Files that match *any* provided filter will be used.
func WithWorkingDir ¶
WithWorkingDir sets the root directory to search in
type FSProvider ¶
type FSProvider struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...FSOption) (FSProvider, error)
New returns a provider.Provider that gets provider.AlbumInfo from a local directory. Images in that directory with names of the form "Artist Name - Album Name" will be converted into the corresponding information structure. If WithWorkingDir isn't provided, the current working directory will be used.