textual_fspicker.select_directory
Provides a directory selection dialog.
CurrentDirectory
Bases: Label
A widget to show the current directory.
This widget is used inside a
SelectDirectory
dialog to display
the currently-selected directory.
current_directory
class-attribute
instance-attribute
current_directory = var(None, always_update=True)
The current directory.
SelectDirectory
SelectDirectory(
location=".",
title="Select directory",
*,
select_button="",
cancel_button="",
)
Bases: FileSystemPickerScreen
A directory selection dialog.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str | Path
|
Optional starting location. |
'.'
|
|
str
|
Optional title. |
'Select directory'
|
|
ButtonLabel
|
The label for the select button. |
''
|
|
ButtonLabel
|
The label for the cancel button. |
''
|
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.