Skip to main content

Module ls

Module ls 

Source

Structs§

ColorDb
Parsed colour database.
FileEntry
One entry to display.
LsConfig
Full configuration for ls.

Enums§

ClassifyMode
File-type classify mode (for -F / –classify).
ColorMode
When to emit ANSI colour escapes.
HyperlinkMode
When to emit hyperlinks.
IndicatorStyle
What indicators to append to names.
OutputFormat
Output layout.
QuotingStyle
Quoting style for file names.
SortBy
How to sort directory entries.
TimeField
Which timestamp to show / sort by.
TimeStyle
How to format timestamps in long listing.

Functions§

atty_stdout
Check if stdout is a TTY.
collect_entries
Collect entries for a directory into a Vec (for testing).
format_blocks
Format blocks for the -s option (in 1K units by default, or –si / -h).
format_permissions
Format permission bits as drwxr-xr-x (10 chars).
format_size
Format a file size for display.
format_time
Format a unix timestamp for long listing.
glob_match
Simple glob matching (supports * and ?).
ls_dir
List a single directory to the provided writer.
ls_main
Top-level entry: list the given paths.
print_comma
quote_name
Quote a filename according to the configured quoting style.
read_entries
Read entries from a directory path.
render_dir
Render full ls_dir output to a String (for testing).
render_long
Render long format lines to a String (for testing).
render_single_column
Render single-column output to a String (for testing).