Skip to content

Workspace.getActiveFile method

Workspace › getActiveFile

Official

Returns the file for the current view if it's a FileView. Otherwise, it will return the most recently active file.

Signature:

getActiveFile(): TFile | null

Returns: TFile | null