Skip to content

MetadataCacheBlockCache.getForFile method

MetadataCacheBlockCache › getForFile

Unofficial

Gets the entry of a file, reading and parsing the file unless the cached entry is for the same file and modification time.

Signature:

getForFile(runnable: Runnable, file: TFile): Promise<MetadataCacheBlockCacheFileEntry | null>

Parameters:

ParameterTypeDescription
runnableRunnableThe run the caller can cancel.
fileTFileThe file to get the entry of.

Returns: Promise<MetadataCacheBlockCacheFileEntry | null> — A promise resolving to the entry, or null when the file is not markdown or the run was cancelled.