MetadataCache.iterateRefsForFile method
MetadataCache › iterateRefsForFile
Unofficial
Iterate over all references for a specific file.The callback is invoked with each reference found in the file, frontmatter links first, so the reference is not necessarily a
obsidian#ReferenceCache and may carry no position. Returning true from it stops the iteration.Signature:
iterateRefsForFile(file: TFile, callback: (reference: Reference) => boolean | void): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| file | TFile | The file to iterate references for. |
| callback | (reference: Reference) => boolean | void | The callback to execute for each reference. |
Returns: void