Skip to content

listSafe

Safely lists the files and folders at the specified path in the vault.

Import:

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

Signature:

function listSafe(app: App, pathOrFolder: PathOrFolder): Promise<ListedFiles>

Parameters:

ParameterTypeDescription
appAppThe Obsidian application instance.
pathOrFolderPathOrFolderThe path or folder to list.

Returns: Promise<ListedFiles> — A Promise that resolves to a ListedFiles object containing the listed files and folders.