Skip to content

trashSafe

Trashes an abstract file safely from the vault.

Import:

import { trashSafe } from 'obsidian-dev-utils/obsidian/vault';

Signature:

function trashSafe(app: App, pathOrFile: PathOrAbstractFile): Promise<void>

Parameters:

ParameterTypeDescription
appAppThe Obsidian application instance.
pathOrFilePathOrAbstractFileThe path or abstract file to trash.

Returns: Promise<void> — A Promise that resolves when the file is trashed.