file_list

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileListModel

type FileListModel struct {
	list.Model
	// contains filtered or unexported fields
}

FileListModel is the file list view model. It renders the list of files found in its bound workDirectory.

func New

func New(workDirectory string) (FileListModel, error)

New creates a new FileListModel, bound ot the provided workDirectory.

func (FileListModel) Init

func (m FileListModel) Init() tea.Cmd

Init ...

func (FileListModel) SetIsActive

func (m FileListModel) SetIsActive(active bool) FileListModel

SetIsActive toggles active/focusState state for this model.

func (FileListModel) Update

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

Update ...

func (FileListModel) View

func (m FileListModel) View() string

View ...

type Item

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

Item is a single item to render in the FileListModel.

func NewItem

func NewItem(name, parent string, modtime time.Time) Item

NewItem builds a new item from input.

func (Item) Description

func (i Item) Description() string

Description is used by list.DefaultDelegate.

func (Item) FilterValue

func (i Item) FilterValue() string

FilterValue returns the value to reference when the list is in filter mode.

func (Item) FullPath

func (i Item) FullPath() string

FullPath returns the absolute path to the file item.

func (Item) Title

func (i Item) Title() string

Title is used by list.DefaultDelegate.

Jump to

Keyboard shortcuts

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