Skip to content

getBacklinksForFileOrPath

Retrieves the backlinks for a file or path. NOTE: The file may be non-existent.

Import:

import { getBacklinksForFileOrPath } from 'obsidian-dev-utils/obsidian/metadata-cache';

Signature:

function getBacklinksForFileOrPath(app: App, pathOrFile: PathOrFile): CustomArrayDict<Reference>

Parameters:

ParameterTypeDescription
appAppThe Obsidian application instance.
pathOrFilePathOrFileThe path or file object.

Returns: CustomArrayDict<Reference> — The backlinks for the file.