getOrCreateFolderSafe
Gets or creates a folder safely in the specified path.
If the folder already exists, it will be returned. If the folder does not exist, it will be created and returned.
Import:
import { getOrCreateFolderSafe } from 'obsidian-dev-utils/obsidian/vault';Signature:
function getOrCreateFolderSafe(app: App, path: string): Promise<TFolder>Parameters:
| Parameter | Type | Description |
|---|---|---|
app | App | The application instance. |
path | string | The path of the folder to get or create. |
Returns: Promise<TFolder> — A Promise that resolves to the folder.