Skip to content

unlockResourceForPath

Releases one lock previously acquired for the note at the given path via lockResourceForPath.

When the last lock is released the note becomes fully editable again and its lock indicators are removed. Calling this when the note is not locked is a no-op.

Import:

import { unlockResourceForPath } from '@mnaoumov/obsidian-lib/resource-lock';

Signature:

function unlockResourceForPath(app: App, pathOrFile: PathOrFile, pluginId: string): void

Parameters:

Parameter Type Description
app App The Obsidian app instance.
pathOrFile PathOrFile The path or file of the note to unlock.
pluginId string The id of the plugin that holds the lock (e.g. its manifest.id); one of its locks on the note is released.

Returns: void


Links to this page: