class

Glimmer::TUI::FileBrowser

Inherits Reference < Object

FileBrowser provides an interactive file browser for finding markdown files.

Constants

MARKDOWN_EXTENSIONS = [".md", ".markdown", ".mdown", ".mkd"]

Constructors

new(current_dir : String = Dir.current)
Source

Class methods

help_text

Returns help text for keybindings

Source

Instance methods

apply_filter(filter_text : String)

Applies a filter to the file list

Source
clear_filter

Clears the filter

Source
current_dir
Source
current_dir=(current_dir : String)
Source
enter_directory

Navigates into the selected directory

Source
files
Source
files=(files : Array(String))
Source
filter
Source
filter=(filter : String)
Source
find_markdown_files

Finds all markdown files in the current directory

Source
move_down

Moves selection down

Source
move_to_bottom

Moves selection to the bottom

Source
move_to_top

Moves selection to the top

Source
move_up

Moves selection up

Source
render(screen : Screen, height : Int32, width : Int32)

Renders the file browser to the screen

Source
scroll_offset
Source
scroll_offset=(scroll_offset : Int32)
Source
selected_directory?

Returns true if the selected item is a directory

Source
selected_index
Source
selected_index=(selected_index : Int32)
Source
selected_name

Returns the currently selected item name

Source
selected_parent?

Returns true if the selected item is the parent directory

Source
selected_path

Returns the currently selected file path

Source
visible_height
Source
visible_height=(visible_height : Int32)
Source