Skip to content

getNoteFilesSorted

Retrieves an array of all note files from the app’s vault and sorts them alphabetically by their file path.

Import:

import { getNoteFilesSorted } from 'obsidian-dev-utils/obsidian/vault';

Signature:

function getNoteFilesSorted(app: App): TFile[]

Parameters:

ParameterTypeDescription
appAppThe Obsidian app instance.

Returns: TFile[] — An array of all note files in the vault sorted by file path.