annie.pages.folder_picker

Server-side folder/file pickers for the Dataset tab.

Annie runs locally, so the browser and the filesystem are the same machine: the user can navigate the real directory tree and pick a folder (or a file) instead of typing its path. Thin NiceGUI views over the pure helpers in annie.system.fsbrowse.

Functions

pick_directory(→ str | None)

Open a modal folder picker and return the chosen directory path.

pick_file(→ str | None)

Open a modal file picker and return the chosen file path.

Module Contents

async annie.pages.folder_picker.pick_directory(start: str | pathlib.Path | None = None) → str | None[source]

Open a modal folder picker and return the chosen directory path.

Parameters:

start – A path hint to open at. Falls back to the nearest existing ancestor or the home directory.

Returns:

The absolute path of the selected folder, or None if cancelled.

async annie.pages.folder_picker.pick_file(start: str | pathlib.Path | None = None) → str | None[source]

Open a modal file picker and return the chosen file path.

Navigate folders as usual; clicking a file selects it and closes the dialog.

Parameters:

start – A path hint to open at (a file or its directory).

Returns:

The absolute path of the selected file, or None if cancelled.