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

PropertyTypeDescription
coverElHTMLElementOverlay element covering the tree item, used for visual effects.
(Inherited from AbstractFileTreeItem)
fileTFileAssociated file with this item.
(Inherited from AbstractFileTreeItem)
infoTreeNodeInfoTree node metadata and layout information.
(Inherited from AbstractFileTreeItem)
innerElHTMLElementInner container element holding the tree item content.
(Inherited from AbstractFileTreeItem)
parentFileTreeItemParentParent tree item (folder or tree root).
(Inherited from AbstractFileTreeItem)
renderedbooleanWhether this item has been rendered to the DOM.
(Inherited from AbstractFileTreeItem)
selfElHTMLElementThe main element representing this tree item in the DOM.
(Inherited from AbstractFileTreeItem)
tagElHTMLElement | nullElement that indicates associated file extension, if it wasn't a Markdown file.
viewFileExplorerViewReference to the file explorer view containing this item.
(Inherited from AbstractFileTreeItem)

Methods

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

Links to this page: