Skip to content

AbstractFileTreeItem<T>

Unofficial

Base interface for file and folder tree items in the file explorer.

Import:

import type { AbstractFileTreeItem } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface AbstractFileTreeItem<T extends TAbstractFile> extends TreeItem

Extends: TreeItem

Properties

PropertyTypeDescription
coverElHTMLElementOverlay element covering the tree item, used for visual effects.
(Inherited from TreeItem)
fileTAssociated file with this item.
infoTreeNodeInfoTree node metadata and layout information.
innerElHTMLElementInner container element holding the tree item content.
(Inherited from TreeItem)
parentFileTreeItemParentParent tree item (folder or tree root).
renderedbooleanWhether this item has been rendered to the DOM.
selfElHTMLElementThe main element representing this tree item in the DOM.
(Inherited from TreeItem)
viewFileExplorerViewReference to the file explorer view containing this item.

Methods

MethodReturnsDescription
getTitle()stringGet the display title for this tree item.
isFullTimeShown()booleanWhether the full timestamp is shown for this item.
onRender()voidCalled when this item is rendered to the DOM.
onSelfClick(event)voidExecute item functionality on clicking tree item.
(Inherited from TreeItem)
setClickable(value)voidSet clickable state of tree item.
(Inherited from TreeItem)
startRename()voidBegin inline renaming of this tree item.
stopRename()voidCancel inline renaming of this tree item.
updateTitle()voidRefresh the displayed title of this tree item.

Links to this page: