files

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaxFiles = 5000

Maximum number of files to collect

Variables

This section is empty.

Functions

func FormatEntry

func FormatEntry(e Entry) string

FormatEntry formats a file entry for display in the TUI list

func GeneratePreview

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

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

func GetDirectoryListing

func GetDirectoryListing(path string) string

GetDirectoryListing returns a formatted listing of a directory's contents

func GetFileIcon

func GetFileIcon(isDir bool) string

GetFileIcon returns the appropriate icon for a file or directory

Types

type Entry

type Entry struct {
	Path  string
	IsDir bool
}

Entry represents a file or directory

func Collect

func Collect(root string) []Entry

Collect walks the directory tree and collects all files and directories

func (Entry) GetInfo added in v0.2.2

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

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

Jump to

Keyboard shortcuts

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