Skip to content

trashSafe

Trashes an abstract file safely from the vault.

Import:

import { trashSafe } from '@mnaoumov/obsidian-lib/vault';

Signature:

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

Parameters:

Parameter Type Description
app App The Obsidian application instance.
pathOrFile PathOrAbstractFile The path or abstract file to trash.

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


Links to this page: