File/directory browser at the server side.
@solara.component def FileBrowser( directory: Union[str, Path] = None, on_directory_change: Callable[[Path], None] = None, on_path_select: Callable[[Optional[Path]], None] = None, on_file_open: Callable[[Path], None] = None, filter: Callable[[Path], bool] = lambda x: True, directory_first: bool = False, on_file_name: Callable[[str], None] = None, start_directory=None, can_select=False, ): ...
There are two modes possible
on_file_open: Triggered when single clicking a file or directoy.
on_path_select: Never triggered
on_directory_change: Triggered when clicking a directory
on_file_open: Triggered when double clicking a file or directoy.
on_path_select: Triggered when clicking a file or directoy
on_directory_change: Triggered when double clicking a directory
directory: The directory to start in. If
Nonethe current working directory is used.
on_directory_change: Depends on mode, see above.
on_path_select: Depends on mode, see above.
on_file_open: Depends on mode, see above.
filter: A function that takes a
Trueif the file/directory should be shown.
Truedirectories are shown before files. Default:
on_file_name: (deprecated) Use on_file_open instead.
start_directory: (deprecated) Use directory instead.
You are in directory: /home/runner
You selected path: None
You opened file: None