FilePicker

interface FilePicker

File selection for import/export flows (e.g. picking a receipt, saving an export). Android/iOS: Calf's file-picker/file-saver, bridged from the host's Compose layer — Calf's launchers are @Composable (they wrap rememberLauncherForActivityResult/UIDocumentPickerViewController), so like PermissionsProvider.request's ActivityResult dialog, the actual pick/save UI can't be driven from this headless module and is bridged in by whoever hosts the Compose UI.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun pickFile(): ByteArray?

Prompts the user to pick a file; null if cancelled, unavailable, or no host UI has wired the picker.

Link copied to clipboard
abstract suspend fun saveFile(fileName: String, bytes: ByteArray): Boolean

Prompts the user to choose a save location and writes bytes there; true on success.