FirmwareFileHandler
Abstraction over platform file and network I/O required by the firmware update pipeline. Implementations live in androidMain and jvmMain.
Inheritors
Functions
Return true if url is reachable (HTTP HEAD check).
Remove all temporary firmware files created during previous update sessions.
Copy source to the platform URI destinationUri, returning the number of bytes written.
Delete a single firmware file from local storage.
Extract a matching firmware binary from a platform URI (e.g. content:// or file://) zip archive.
Extract a matching firmware binary from a previously-downloaded zip FirmwareArtifact.
Extract all entries from a zip artifact into a Map<entryName, bytes>. Used by the DFU handler to parse Nordic DFU packages.
Resolve a user-visible display filename for uri, or null when the provider does not expose one.
Return the size in bytes of the given firmware file.
Copy a platform URI into a temporary FirmwareArtifact so it can be read with readBytes. Returns null when the URI cannot be resolved.
True when destinationUri can still be opened for reading.
Best-effort check that destinationUri names a location on removable storage — i.e. plausibly a mounted UF2 bootloader drive rather than internal storage.
Read the raw bytes of a FirmwareArtifact.
Reads a file sitting alongside the documents in treeUri, or null when it is absent or unreadable.