Documentation
¶
Overview ¶
Package megafile provides functionality for a simple TUI for browsing files and directories
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExit = errors.New("exit")
ErrExit is the error that is returned if the user appeared to want to exit
Functions ¶
Types ¶
type FileEntry ¶ added in v1.2.0
type FileEntry struct {
// contains filtered or unexported fields
}
FileEntry represents a file entry with position and name information
type State ¶
type State struct {
StartMessage string // title/header
Directories []string
AngleColor vt.AttributeColor
PromptColor vt.AttributeColor
TitleColor vt.AttributeColor
HighlightBackground vt.AttributeColor
Background vt.AttributeColor
EdgeBackground vt.AttributeColor
WrittenTextColor vt.AttributeColor
ShowHidden bool
// contains filtered or unexported fields
}
State holds the current state of the shell, then canvas and the directory structures
func New ¶ added in v1.2.7
New creates a new MegaFile State c and tty is a canvas and TTY, initiated with the vt package startdirs is a slice of directories to browse (toggle with tab) startMessage is the string to display at the top of the screen the function returns the absolute path to the directory the user ended up in, and an error if something went wrong
Click to show internal directories.
Click to hide internal directories.
