FileJabbitStorage

JabbitStorage backed by a file on disk. This is the default on the desktop.

Writes go to a temporary file next to file and are moved into place atomically, so a crash halfway through a write leaves the previous queue intact rather than a truncated document.

Constructors

Link copied to clipboard
constructor(file: Path)

Functions

Link copied to clipboard
open suspend override fun read(): String?

Returns the previously stored document, or null when nothing has been stored yet.

Link copied to clipboard
open suspend override fun write(value: String)

Stores value, replacing whatever was stored before.