Documentation
¶
Overview ¶
Package entry provides functionality for listing directory entries with customizable formatting and cross-platform support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFlags ¶
ParseFlags parses command-line flags and returns the configuration.
func PrintEntries ¶
PrintEntries prints entries to stdout and, if cfg.Recurse is true, recurses into subdirectories.
Types ¶
type Config ¶
type Config struct {
All bool
Grid bool
Long bool
Header bool
Recurse bool
Tree bool
Classify bool
Dereference bool
Size bool
Time bool
Kind bool
Ext bool
Reverse bool
NoColor bool
NoSort bool
}
Config holds command-line configuration options for directory listing.
type Entry ¶
Entry represents a file or directory with its metadata. It embeds os.FileInfo to provide direct access to file information methods (Size, ModTime, IsDir, etc).
func (Entry) Classify ¶
Classify classifies an entry and returns its type identifier and display symbol. Returns two strings: (typeIdentifier, displaySymbol)
func (Entry) DisplayName ¶
DisplayName formats the basename of an entry and returns the formatted string.