Arcane OS Docs Development only

Reference

Arcane.storage.delete()

Deletes one app-scoped value; an absent key resolves with deleted:false. Requires storage.write.

  • Reference

This focused page is derived from the mechanically checked full member inventory.

Syntax

Arcane.storage.delete(key)

Parameters

key: 1–128-character app-storage key

Return value

Promise<{key, deleted:boolean, totalBytes, maximumBytes}>

Description

Deletes one app-scoped value; an absent key resolves with deleted:false. Requires storage.write.

Overview

Deletes one key from the current application's native storage. Deleting a key that is already absent is safe and resolves with deleted:false.

Return value and errors

Requires storage.write and resolves to {key,deleted,totalBytes,maximumBytes}. Invalid keys reject before the storage file is read. A successful deleted:true result means the updated storage envelope was written atomically.

Side effects and recovery

Deletes are serialized with writes to the same app-owned document. If the renderer loses its connection around a delete, call get() after reconnecting to establish whether the key remains before offering another destructive action; a missing response is not proof that the mutation failed.

Example

async function discardDraft() {
    const result = await Arcane.storage.delete('editor.draft.current');
    console.log(result.deleted ? 'Draft removed' : 'No draft was stored');
}

document.querySelector('#discard-draft')?.addEventListener(
    'click',
    discardDraft
);

Reference group

Filesystem, storage, preferences, and appearance

Repository and reviewed source access