textual_fspicker.file_dialog
Base file-oriented dialog.
BaseFileDialog
BaseFileDialog(
location=".",
title="Open",
select_button="",
cancel_button="",
*,
filters=None,
default_file=None,
)
Bases: FileSystemPickerScreen
The base dialog for file-oriented picking dialogs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str | Path
|
Optional starting location. |
'.'
|
|
str
|
Optional title. |
'Open'
|
|
ButtonLabel
|
The label for the select button. |
''
|
|
ButtonLabel
|
The label for the cancel button. |
''
|
|
Filters | None
|
Optional filters to show in the dialog. |
None
|
|
str | Path | None
|
The default filename to place in the input. |
None
|
ERROR_A_FILE_MUST_BE_CHOSEN
class-attribute
instance-attribute
ERROR_A_FILE_MUST_BE_CHOSEN = 'A file must be chosen'
An error to show the user when a file should be chosen.
FileFilter
The file type filtering widget.
This widget provides a file filter drop-down selection for all dialogs
that inherit from
BaseFileDialog
.