Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileBrowser ¶
type FileBrowser struct { Filenames []string // contains filtered or unexported fields }
FileBrowser is a tool to browse through files in a directory.
It is a helper to browse through image files.
func NewFileBrowser ¶
func NewFileBrowser(filename string, extensions map[string]struct{}) (browser FileBrowser, err error)
NewFileBrowser creates a new file browser from a string pointing to a file or directory. If it is a file, then that is the initial file selected by the returned FileBrowser. If it is a directory, then the index will start at 0.
func (*FileBrowser) Current ¶
func (browser *FileBrowser) Current() string
Current gets the current file.
func (*FileBrowser) IsEmpty ¶ added in v0.4.0
func (browser *FileBrowser) IsEmpty() bool
IsEmpty checks if there are no files that can be browsed.
Click to show internal directories.
Click to hide internal directories.