Skip to content

FileTreeItem

Unofficial

Tree item representing a file in the file explorer.

Import:

import type { FileTreeItem } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface FileTreeItem extends AbstractFileTreeItem<TFile>

Extends: AbstractFileTreeItem<TFile>

Properties

Property Type Description
coverEl HTMLElement Overlay element covering the tree item, used for visual effects.
(Inherited from AbstractFileTreeItem)
file TFile Associated file with this item.
(Inherited from AbstractFileTreeItem)
info TreeNodeInfo Tree node metadata and layout information.
(Inherited from AbstractFileTreeItem)
innerEl HTMLElement Inner container element holding the tree item content.
(Inherited from AbstractFileTreeItem)
parent FileTreeItemParent Parent tree item (folder or tree root).
(Inherited from AbstractFileTreeItem)
rendered boolean Whether this item has been rendered to the DOM.
(Inherited from AbstractFileTreeItem)
selfEl HTMLElement The main element representing this tree item in the DOM.
(Inherited from AbstractFileTreeItem)
tagEl HTMLElement | null Element that indicates associated file extension, if it wasn't a Markdown file.
view FileExplorerView Reference to the file explorer view containing this item.
(Inherited from AbstractFileTreeItem)

Methods

Method Returns Description
getTitle() string Get the display title for this tree item.
(Inherited from AbstractFileTreeItem)
isFullTimeShown() boolean Whether the full timestamp is shown for this item.
(Inherited from AbstractFileTreeItem)
isSupported() boolean Check whether the file type is supported for opening.
onRender() void Called when this item is rendered to the DOM.
(Inherited from AbstractFileTreeItem)
onSelfClick(event) void Execute item functionality on clicking tree item.
(Inherited from AbstractFileTreeItem)
setClickable(value) void Set clickable state of tree item.
(Inherited from AbstractFileTreeItem)
startRename() void Begin inline renaming of this tree item.
(Inherited from AbstractFileTreeItem)
stopRename() void Cancel inline renaming of this tree item.
(Inherited from AbstractFileTreeItem)
updateTitle() void Refresh the displayed title of this tree item.
(Inherited from AbstractFileTreeItem)

Links to this page: