Skip to content

RenameDeleteHandlerSettings

Settings for the rename/delete handler.

Import:

import type { RenameDeleteHandlerSettings } from '@mnaoumov/obsidian-lib/components/rename-delete-handler-component';

Signature:

export interface RenameDeleteHandlerSettings

Properties

PropertyTypeDescription
emptyFolderBehaviorEmptyFolderBehaviorA behavior of the rename/delete handler when deleting empty folders.
getRescuePath?(params: GetRescuePathParams) => Promise<null | string>Where to move an attachment that a deletion would otherwise strand — one that survives because another note still references it, but is left sitting in a folder whose owning note is gone.

Deciding the destination is the plugin's attachment-path policy, which is why the handler asks rather than guesses. Returning null — or not implementing this at all — keeps the attachment where it is, which is the behavior every consumer had before this member existed.
isNote(path: string) => booleanWhether the path is a note.
isPathIgnored(path: string) => booleanWhether to ignore the path.
shouldDeleteConflictingAttachmentsbooleanWhether to delete conflicting attachments.
shouldHandleDeletionsbooleanWhether to handle deletions.
shouldHandleRenamesbooleanWhether to handle renames.
shouldRenameAttachmentFilesbooleanWhether to rename attachment files when a note is renamed.
shouldRenameAttachmentFolderbooleanWhether to rename attachment folder when a note is renamed.
shouldUpdateFileNameAliasesbooleanWhether to update file name aliases when a note is renamed.

Links to this page: