createTFileInstance
Unofficial
Creates and properly initializes the instance of obsidian#TFile even the underlying file does not exist. This doesn’t create the missing file on the file system.
Import:
import { createTFileInstance } from '@obsidian-typings/obsidian-public-latest/implementations';Signature:
function createTFileInstance(app: App, path: string): TFileParameters:
| Parameter | Type | Description |
|---|---|---|
app | App | The Obsidian app instance. |
path | string | The path to the file. |
Returns: TFile — The created obsidian#TFile instance.