Vault โ€บ getAbstractFileByPath

Vault.getAbstractFileByPath() method

Get a file or folder inside the vault at the given path. To check if the return type is a file, use instanceof TFile. To check if it is a folder, use instanceof TFolder.

Signature:

getAbstractFileByPath(path: string): TAbstractFile | null;

Parameters

ParameterTypeDescription
pathstringvault absolute path to the folder or file, with extension, case sensitive.

Returns:

TAbstractFile | null

the abstract file, if itโ€™s found.