files

package
v0.0.0-...-45224f2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SELECT_COLOR = "#4F8A95"

Variables

This section is empty.

Functions

func Register

func Register() *command.SCommand

Types

type FileInfo

type FileInfo struct {
	Size int      `json:"size"`
	Name string   `json:"name"`
	Path string   `json:"path"`
	Type FileType `json:"type"`
	Dir  string   `json:"dir"`
	Ext  string   `json:"ext"`
}

func NewFileInfo

func NewFileInfo(file_path string) FileInfo

func ReadPath

func ReadPath(p string) []FileInfo

type FileInfoFilter

type FileInfoFilter struct {
}

func NewFileInfoFilter

func NewFileInfoFilter() FileInfoFilter

func (*FileInfoFilter) Filter

func (f *FileInfoFilter) Filter(item *FileInfo) bool

type FileInfoList

type FileInfoList struct {
	Files      *[]FileInfo
	Cursor     int
	Filter     FileInfoFilter
	CurentPath string
	Selected   int
}

func NewFileInfoList

func NewFileInfoList(filter FileInfoFilter, files *[]FileInfo) FileInfoList

func (*FileInfoList) Init

func (f *FileInfoList) Init() tea.Cmd

func (*FileInfoList) Run

func (f *FileInfoList) Run()

func (*FileInfoList) Update

func (f *FileInfoList) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*FileInfoList) View

func (f *FileInfoList) View() string

type FileType

type FileType int
const (
	FileTypeFile FileType = iota
	FileTypeDir
)

func (FileType) String

func (t FileType) String() string

Jump to

Keyboard shortcuts

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