files

package
v0.6.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 4 Imported by: 0

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) Back

func (browser *FileBrowser) Back()

Back moves back one file.

func (*FileBrowser) Current

func (browser *FileBrowser) Current() string

Current gets the current file.

func (*FileBrowser) Forward

func (browser *FileBrowser) Forward()

Forward moves forward one 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL