Skip to content

createTempFolder

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

Import:

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

Signature:

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

Parameters:

ParameterTypeDescription
appAppThe application instance.
pathstringThe 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.