Skip to main content

Module path_picker

Module path_picker 

Source
Expand description

A filesystem path picker modal.

Browses directories: Up/Down move (cyclic), Right descends into a folder, Left/Backspace (empty filter) ascends, typing filters the entries, Ctrl+H toggles hidden (dot-prefixed) entries (hidden by default), Enter selects the highlighted entry (a folder, or a file when allow_files), Esc cancels.

An optional confinement root (PathPickerConfig::root) bounds navigation: the picker never ascends above it and never follows a symlinked folder out of it (both are checked with canonicalize + starts_with).

Structs§

PathPickerConfig
How to open the path_picker: the modal title, the start directory, whether files (not just folders) are selectable, and an optional confinement root that navigation may not leave.

Functions§

path_picker
Opens the picker per config. Returns Value(path) on selection, Cancelled on Esc, Quit on the global quit chord.