Skip to content

asFile

Converts an abstract file to a file.

Import:

import { asFile } from 'obsidian-dev-utils/obsidian/file-system';

Signature:

function asFile(abstractFile: TAbstractFile | null): TFile

Parameters:

ParameterTypeDescription
abstractFileTAbstractFile | nullThe abstract file to convert.

Returns: TFile — The file.