Skip to content

obsidian/file-explorer

This module provides utilities for working with Obsidian’s core file explorer.

Interface Description
RevealInFileExplorerParams Parameters for revealInFileExplorer.
Function Description
revealInFileExplorer Highlights a file or folder in the core file explorer, and resolves only once the explorer has finished taking the focus for it. The core plugin’s revealInFolder is typed void but is asynchronous at runtime, and the explorer re-activates itself on a later frame. A caller that moves the focus somewhere else right after the reveal — back into an editor, say — loses that race unless it awaits this. A disabled file explorer reveals nothing, and the returned promise resolves at once.