Workspace.getActiveFile() method
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
1 min read
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