getOrCreateAbstractFileSafe
Gets or creates an abstract file safely in the specified path.
If the file already exists, it will be returned. If the file does not exist, it will be created and returned.
Import:
import { getOrCreateAbstractFileSafe } from 'obsidian-dev-utils/obsidian/vault';Signature:
function getOrCreateAbstractFileSafe(params: GetOrCreateAbstractFileSafeParams): Promise<TAbstractFile>Parameters:
| Parameter | Type | Description |
|---|---|---|
params | GetOrCreateAbstractFileSafeParams | The parameters for getting or creating the abstract file. |
Returns: Promise<TAbstractFile> — A Promise that resolves to the abstract file.
Links to this page: