Skip to content

FileView.getState method

FileView › getState

Gets the view's serializable state, which carries the loaded file's path as Obsidian's does.

Signature:

getState(): Record<string, unknown>

Returns: Record<string, unknown> — A shallow copy of the inherited view state, with file added when a file is loaded.