Skip to content

createTemporaryFolder

Creates a temporary folder in the vault with parent folders if needed.

Import:

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

Signature:

function createTemporaryFolder(app: App, path: string): Promise<() => Promise<void>>

Parameters:

Parameter Type Description
app App The application instance.
path string The path of the folder to create.

Returns: Promise<() => Promise<void>> — A Promise that resolves to a function that can be called to delete the temporary folder and all its created parents.