files

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Root     string
	MaxFiles int
	SkipDirs map[string]bool
}

Collector walks the directory tree and collects files and directories

func NewCollector

func NewCollector(root string) *Collector

NewCollector creates a Collector with sensible defaults

func (*Collector) Collect

func (c *Collector) Collect() []Entry

Collect walks the directory tree and returns all collected entries

type Entry

type Entry struct {
	Path  string
	IsDir bool
}

Entry represents a file or directory

func (Entry) DirectoryListing

func (e Entry) DirectoryListing() string

DirectoryListing returns a formatted listing of the entry's directory contents

func (Entry) Format

func (e Entry) Format() string

Format formats the entry for display in the TUI list

func (Entry) GeneratePreview

func (e Entry) GeneratePreview(width, height int) string

GeneratePreview generates a preview of the file entry for the TUI preview window

func (Entry) GetInfo

func (e Entry) GetInfo() (int64, fs.FileMode)

GetInfo returns file info (size and mode) for the entry

func (Entry) Icon

func (e Entry) Icon() string

Icon returns the appropriate icon for a file or directory

Jump to

Keyboard shortcuts

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