Skip to content

getMarkdownFilesSorted

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

Import:

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

Signature:

function getMarkdownFilesSorted(app: App): TFile[]

Parameters:

ParameterTypeDescription
appAppThe Obsidian app instance.

Returns: TFile[] — An array of Markdown files sorted by file path.