Skip to main content

Module file_picker

Module file_picker 

Source
Expand description

Host-side native file and folder picker for Oxide guest modules.

Guests call api_file_pick / api_folder_pick to invoke the OS picker and receive opaque u32 handles. Paths never cross the sandbox boundary; the host keeps a HashMap<handle, PathBuf> and exposes reads via api_file_read, api_file_read_range, and api_file_metadata.

api_folder_entries lists a picked directory as JSON, pre-allocating sub-handles for each child so the guest can read files without ever seeing the underlying path.

Structs§

FilePickerState
All picker state for a tab. Handles are never reused within a session.
PickedEntry
One picked file or folder, keyed by an opaque handle the guest holds.

Functions§

register_file_picker_functions
Register all file picker host functions.