Editor

interface Editor

Edits the values for an entry.

Calling metadata or data marks that file as dirty so it will be persisted to disk if this editor is committed.

IMPORTANT: You must only read or modify the contents of metadata or data. Renaming, locking, or other mutating file operations can corrupt the disk cache.

Properties

Link copied to clipboard
abstract val data: Path

Get the data file path for this entry.

Link copied to clipboard
abstract val metadata: Path

Get the metadata file path for this entry.

Functions

Link copied to clipboard
abstract fun abort()

Abort the edit. Any written data will be discarded.

Link copied to clipboard
abstract fun commit()

Commit the edit so the changes are visible to readers.

Link copied to clipboard

Commit the write and call openSnapshot for this entry atomically.