Skip to content

textual_fspicker.select_directory

Provides a directory selection dialog.

SelectDirectory

SelectDirectory(
    location=".",
    title="Select directory",
    *,
    select_button="",
    cancel_button="",
    double_click_directories=True,
)

Bases: FileSystemPickerScreen

A directory selection dialog.

Parameters:

Name Type Description Default

location

str | Path

Optional starting location.

'.'

title

str

Optional title.

'Select directory'

select_button

ButtonLabel

The label for the select button.

''

cancel_button

ButtonLabel

The label for the cancel button.

''

double_click_directories

bool

Double click to open directories.

True
Notes

select_button and cancel_button can either be strings that set the button label, or they can be functions that take the default button label as a parameter and return the label to use.