class

Term2::Components::FilePicker

Inherits Term2::Model < Reference < Object

Constructors

new(path : String = ".", id : String = "")
Source

Class methods

default_filter(term : String, targets : Array(String)) : Array(Rank)
Source

Instance methods

allowed_types
Source
allowed_types=(allowed_types : Array(String))
Source
blur

Blur (unfocus) this model's zone.

Source
current_directory
Source
current_directory=(current_directory : String)
Source
cursor_style

Styles

Source
cursor_style=(cursor_style : Style)

Styles

Source
did_select_file?
Source
dir_allowed=(dir_allowed : Bool)
Source
dir_allowed?
Source
dir_style
Source
dir_style=(dir_style : Style)
Source
error
Source
error=(error : String | Nil)
Source
error_style
Source
error_style=(error_style : Style)
Source
file_allowed=(file_allowed : Bool)
Source
file_allowed?
Source
file_style
Source
file_style=(file_style : Style)
Source
files
Source
files=(files : Array(String))
Source
filter_func
Source
filter_func=(filter_func : FilterFunc)
Source
filter_text
Source
filter_text=(text : String)
Source
focus

Focus this model's zone.

Source
focused?

Whether this model is currently focused.

Source
handle_key(msg : KeyMsg)
Source
height
Source
height=(height : Int32)
Source
id=(id : String)
Source
key_map

Key bindings

Source
key_map=(key_map : KeyMap)

Key bindings

Source
move_cursor(delta : Int32)
Source
open_selected
Source
read_dir
Source
selected_file
Source
selected_file=(selected_file : String | Nil)
Source
selected_index
Source
selected_index=(selected_index : Int32)
Source
selected_style
Source
selected_style=(selected_style : Style)
Source
show_hidden=(show_hidden : Bool)
Source
show_hidden?
Source
update(msg : Msg) : Tuple(FilePicker, Cmd)

Update is called when a message is received. Use it to inspect the message and, in response, update the model and/or send a command.

Source
view

View renders the program's UI, which is just a string. The view is rendered after every Update.

Source
visible_files
Source

Nested types