createTempFile
Creates a temporary file in the vault with parent folders if needed.
Import:
import { createTempFile } from 'obsidian-dev-utils/obsidian/vault';Signature:
function createTempFile(app: App, path: string): Promise<() => Promise<void>>Parameters:
| Parameter | Type | Description |
|---|---|---|
app | App | The application instance. |
path | string | The path of the file to create. |
Returns: Promise<() => Promise<void>> — A Promise that resolves to a function that can be called to delete the temporary file and all its created parents.