files

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the files pane. It holds no client and performs no I/O; listings are set by the caller as they arrive.

func New

func New() Model

func (Model) KeyMap

func (m Model) KeyMap() table.KeyMap

KeyMap returns the pane's key bindings for the help footer.

func (Model) Selected

func (m Model) Selected() (file.Info, bool)

Selected returns the file under the cursor.

func (Model) SetDark

func (m Model) SetDark(dark bool) Model

SetDark adapts the column headers and the selection to a dark or light terminal background.

func (Model) SetErr

func (m Model) SetErr(err error) Model

SetErr shows err below the listing, which is kept so the user can still navigate away from a directory that can't be read.

func (Model) SetFiles

func (m Model) SetFiles(path string, files []file.Info) Model

SetFiles replaces the listing with the contents of directory path and clears any error.

func (Model) SetSize

func (m Model) SetSize(w, h int) Model

SetSize sets the outer size of the pane, including its border.

func (Model) Start

func (m Model) Start() Model

Start clears the pane for a new container.

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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