Skip to main content

Module dialogs

Module dialogs 

Source
Expand description

File dialogs.

Structs§

SaveOutcome
Result of an async save. path is Some on desktop (the written filesystem path); WASM/Android drives the save through the OS so they only report success/failure.

Enums§

PickedFile
A file picked by the user: a real path (desktop) or name+bytes (WASM/Android, where the OS hands us a URI/blob, not a path).

Functions§

export_path
Ask for a write path without writing. Blocking. Desktop only (used by the synchronous Save flow so the unsaved guard stays correct).
init
Register platform I/O callbacks (Android only). No-op elsewhere. Must be called once at app startup.
pick_open_file
Non-blocking single-file open dialog. Works on every target: desktop spawns a thread running the native blocking dialog. Android spawns a thread driving the Activity picker. WASM runs the browser picker on the main thread. on_done(None) fires on cancel/error.
save_bytes
Non-blocking save dialog that writes data. Works on every target. on_done is called with the outcome after the OS finishes.