Package-level declarations
Types
Stores received files, for ReceiveEvent.FileOffered.acceptInto. Use FileSaver.folder for a folder on the file system, or implement it for other storage, such as Android's MediaStore.
How a received directory (a zip) is unpacked. Set it in WormholeConfig.folderUnpacker.
A received directory being unpacked. The library calls createDirectory and createFile (paths are relative, use / and never contain ..), then commit when all files are written, or discard when unpacking failed.
The code does not have the form <number>-<word>[-<word>...].
The zip is damaged, unsafe (a path leaves the target folder) or larger than allowed.
A file to send. open returns a new source with the size bytes of the file each time it is called; the library calls it only when the transfer runs, and closes the source.
The other side stopped with an error message.
Progress of a receive.
A received file could not be stored, for example because the disk is full.
Events emitted by Wormhole.sendFile and Wormhole.sendDirectory.
Events emitted by Wormhole.sendText.
The mailbox server could not be reached, or the connection was lost.
The receiver declined the transfer.
The data connection (direct or through the transit relay) failed.
Where unzip puts the files. Paths are relative, use / and never contain ...
Entry point of the library. Each call returns a cold Flow: the transfer starts when you collect it and is cancelled when you stop collecting. Failures are thrown as WormholeException subclasses.
Settings for a Wormhole. The defaults are compatible with the wormhole CLI.
Base class for all errors reported by this library.
The other side sent something that does not follow the protocol.
The mailbox server reported an error, for example crowded or a welcome error.
The two sides used different codes, so the keys do not match.
Receives the bytes of one zip for a FolderUnpacker.
Properties
Functions
Unpacks the zip file zip into folder, which is created if needed. See the other unzip for the checks and for maxBytes and maxFiles.
Unpacks a received directory (see ReceiveEvent.FileOffered.isDirectory) into target. Reads zips made by the wormhole CLI, wormhole-william and Wormhole.sendDirectory.