FileExplorerView
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:16
Extends
Properties
_children
_children:
Component
[]
Defined in: src/obsidian/augmentations/Components/Component.d.ts:9
Child Components attached to current component, will be unloaded on unloading parent component
Inherited from
_events
_events:
EventRef
[]
Defined in: src/obsidian/augmentations/Components/Component.d.ts:13
Events that are attached to the current component, will be detached on unloading parent component
Inherited from
_loaded
_loaded:
boolean
Defined in: src/obsidian/augmentations/Components/Component.d.ts:17
Whether the component and its children are loaded
Inherited from
app
app:
App
Defined in: obsidian.d.ts:4461
Inherited from
closeable
closeable:
boolean
Defined in: src/obsidian/augmentations/Views/View.d.ts:10
Whether the leaf may close the view
Inherited from
containerEl
containerEl:
HTMLElement
Defined in: obsidian.d.ts:4484
Inherited from
fileItems
fileItems:
FileExplorerViewFileItemsRecord
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:20
Mapping of file path to tree item
files
files:
WeakMapWrapper
<HTMLElement
,TAbstractFile
>
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:24
Mapping of tree self element to abstract file
icon
icon:
string
Defined in: obsidian.d.ts:4465
Inherited from
leaf
leaf:
WorkspaceLeaf
Defined in: obsidian.d.ts:4480
Inherited from
navigation
navigation:
boolean
Defined in: obsidian.d.ts:4475
Whether or not the view is intended for navigation. If your view is a static view that is not intended to be navigated away, set this to false. (For example: File explorer, calendar, etc.) If your view opens a file or can be otherwise navigated, set this to true. (For example: Markdown editor view, Kanban view, PDF view, etc.)
Inherited from
scope
scope:
null
|Scope
Defined in: obsidian.d.ts:4496
Assign an optional scope to your view to register hotkeys for when the view is in focus.
Example
Default
Inherited from
tree
tree:
Tree
<FileTreeItem
>
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:28
Tree view of files
Methods
acceptRename()
acceptRename():
Promise
<void
>
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:33
Try to rename the file
Returns
Promise
<void
>
addChild()
addChild<
T
>(component
):T
Defined in: obsidian.d.ts:887
Adds a child component, loading it if this component is loaded
Type Parameters
• T extends Component
Parameters
component
T
Returns
T
Inherited from
afterCreate()
afterCreate(
file
,newLeaf
):Promise
<void
>
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:39
Is Executed after creating the file or folder and opens the view and/or starts the rename
Parameters
file
The created file
newLeaf
Where to open the view for this file
boolean
| PaneType
Returns
Promise
<void
>
attachFileEvents()
attachFileEvents(
e
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:43
Parameters
e
unknown
Returns
void
close()
close():
Promise
<void
>
Defined in: src/obsidian/augmentations/Views/View.d.ts:21
Closes the view
Returns
Promise
<void
>
Inherited from
createAbstractFile()
createAbstractFile(
type
,location
,newLeaf
):Promise
<void
>
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:50
Creates an file or folder
Parameters
type
The type of file to create
"file"
| "folder"
location
The location where to create the file
newLeaf
Where to open the view for this file
boolean
| PaneType
Returns
Promise
<void
>
createFolderDom()
createFolderDom(
folder
):unknown
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:52
Parameters
folder
Returns
unknown
createItemDom()
createItemDom(
file
):unknown
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:54
Parameters
file
Returns
unknown
displayError()
displayError(
message
,fileItem
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:56
Parameters
message
string
fileItem
unknown
Returns
void
dragFiles()
dragFiles(
event
,t
):unknown
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:58
Parameters
event
t
unknown
Returns
unknown
exitRename()
exitRename():
void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:62
Quits the rename
Returns
void
getDisplayText()
abstract
getDisplayText():string
Defined in: obsidian.d.ts:4542
Returns
string
Inherited from
getEphemeralState()
Call Signature
getEphemeralState():
Record
<string
,unknown
>
Defined in: obsidian.d.ts:4525
Returns
Record
<string
, unknown
>
Inherited from
Call Signature
getEphemeralState():
object
Defined in: src/obsidian/augmentations/Views/View.d.ts:25
Gets the ephemeral (non-persistent) state of the editor
Returns
object
Inherited from
getIcon()
Call Signature
getIcon():
string
Defined in: obsidian.d.ts:4533
Returns
string
Inherited from
Call Signature
getIcon():
string
Defined in: src/obsidian/augmentations/Views/View.d.ts:29
Returns the icon name
Returns
string
Inherited from
getNodeId()
getNodeId(
e
):unknown
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:64
Parameters
e
unknown
Returns
unknown
getSideTooltipPlacement()
getSideTooltipPlacement():
undefined
|"left"
|"right"
Defined in: src/obsidian/augmentations/Views/View.d.ts:33
Returns the placement of the tooltip
Returns
undefined
| "left"
| "right"
Inherited from
getState()
Call Signature
getState():
Record
<string
,unknown
>
Defined in: obsidian.d.ts:4517
Returns
Record
<string
, unknown
>
Inherited from
Call Signature
getState():
object
Defined in: src/obsidian/augmentations/Views/View.d.ts:37
Returns the current state of the view
Returns
object
Inherited from
getViewType()
getViewType():
"file-explorer"
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:70
Get the current view type
Returns
"file-explorer"
Overrides
handleCopy()
handleCopy(
event
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:41
Handle copy event on metadata editor and serialize properties
Parameters
event
Returns
void
Inherited from
handleCut()
handleCut(
event
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:45
Handle cut event on metadata editor and serialize and remove properties
Parameters
event
Returns
void
Inherited from
handlePaste()
handlePaste(
event
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:49
Handle paste event of properties on metadata editor
Parameters
event
Returns
void
Inherited from
isItem()
isItem(
item
):boolean
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:72
Parameters
item
unknown
Returns
boolean
load()
load():
void
Defined in: obsidian.d.ts:865
Load this component and its children
Returns
void
Inherited from
onClose()
onClose():
Promise
<void
>
Defined in: obsidian.d.ts:4509
Returns
Promise
<void
>
Inherited from
onCreate()
onCreate(
file
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:77
Is called when a new file is created in vault. Updates the file tree
Parameters
file
The new file
Returns
void
onCreateNewFolderClick()
onCreateNewFolderClick(
event
):Promise
<void
>
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:82
Is called when on the new folder icon is clicked. Call createAbstractFile()
Parameters
event
The MouseEvent which triggered this function
Returns
Promise
<void
>
onCreateNewNoteClick()
onCreateNewNoteClick(
event
):Promise
<void
>
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:87
Is called when on the new note icon is clicked. Call createAbstractFile()
Parameters
event
The MouseEvent which triggered this function
Returns
Promise
<void
>
onDelete()
onDelete(
file
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:92
Is called when a file in vault is deleted. Updates the file tree
Parameters
file
The deleted file
Returns
void
onDeleteSelectedFiles()
onDeleteSelectedFiles(
event
):unknown
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:97
Called when delete is requested
Parameters
event
unknown
The event triggered this function
Returns
unknown
onExtensionsUpdated()
onExtensionsUpdated():
void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:102
Called when a extensions update is triggered Event: ‘extensions-updated’
Returns
void
onFileMouseout()
onFileMouseout(
event
,targetEl
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:109
Called when the mouse pointer moves away from an element. Event: ‘mouseout’
Parameters
event
The event triggered this function
targetEl
The target Element
Returns
void
onFileMouseover()
onFileMouseover(
event
,targetEl
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:116
Called when the mouse pointer is moved over an element. Updates the tooltip information Event: ‘mouseover’
Parameters
event
The event triggered this function
targetEl
The target Element
Returns
void
onFileOpen()
onFileOpen(
file
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:121
Called when a file is opened. Brings the file to the front.
Parameters
file
The opened file
Returns
void
onFileRenameInput()
onFileRenameInput(
e
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:123
Parameters
e
unknown
Returns
void
onHeaderMenu()
onHeaderMenu(
e
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:51
Parameters
e
unknown
Returns
void
Inherited from
onKeyEnterInRename()
onKeyEnterInRename(
event
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:128
Called when ‘Enter’ is pressed while rename. Accepts the rename
Parameters
event
The event triggered this function
Returns
void
onKeyEscInRename()
onKeyEscInRename():
void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:132
Called when ‘ESC’ is pressed while rename. Denies the rename
Returns
void
onKeyRename()
onKeyRename(
event
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:137
Called when the rename shortcut is pressed
Parameters
event
The event triggered this function
Returns
void
onload()
onload():
void
Defined in: obsidian.d.ts:871
Override this to load your component
Returns
void
Inherited from
onModify()
onModify():
void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:141
Request a sort if not sorted properly
Returns
void
onOpen()
onOpen():
Promise
<void
>
Defined in: obsidian.d.ts:4505
Returns
Promise
<void
>
Inherited from
onPaneMenu()
onPaneMenu(
menu
,source
):void
Defined in: obsidian.d.ts:4549
Populates the pane menu.
(Replaces the previously removed onHeaderMenu
and onMoreOptionsMenu
)
Parameters
menu
source
string
Returns
void
Inherited from
onRename()
onRename(
file
,oldPath
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:147
Is called when a file in vault is renamed. Updates the file tree
Parameters
file
The renamed file
oldPath
string
The old file path
Returns
void
onResize()
onResize():
void
Defined in: obsidian.d.ts:4538
Called when the size of this view is changed.
Returns
void
Inherited from
onTabMenu()
onTabMenu(
menu
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:56
Adds the menu items to the menu
Parameters
menu
the menu to fill
Returns
void
Inherited from
onTitleBlur()
onTitleBlur():
void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:151
Called when the title is deselected. Calls acceptRename()
Returns
void
onunload()
onunload():
void
Defined in: obsidian.d.ts:882
Override this to unload your component
Returns
void
Inherited from
open()
open(
parentEl
):Promise
<void
>
Defined in: src/obsidian/augmentations/Views/View.d.ts:61
Opens the view
Parameters
parentEl
The node the view get attached to
Returns
Promise
<void
>
Inherited from
openFileContextMenu()
openFileContextMenu(
event
,fileItemEl
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:157
Opens the context menu for the file item
Parameters
event
The event
fileItemEl
The file item clicked on
Returns
void
register()
register(
cb
):void
Defined in: obsidian.d.ts:897
Registers a callback to be called when unloading
Parameters
cb
() => any
Returns
void
Inherited from
registerDomEvent()
Call Signature
registerDomEvent<
K
>(el
,type
,callback
,options
?):void
Defined in: obsidian.d.ts:907
Registers an DOM event to be detached when unloading
Type Parameters
• K extends keyof WindowEventMap
Parameters
el
type
K
callback
(this
, ev
) => any
options?
boolean
| AddEventListenerOptions
Returns
void
Inherited from
Call Signature
registerDomEvent<
K
>(el
,type
,callback
,options
?):void
Defined in: obsidian.d.ts:912
Registers an DOM event to be detached when unloading
Type Parameters
• K extends keyof DocumentEventMap
Parameters
el
type
K
callback
(this
, ev
) => any
options?
boolean
| AddEventListenerOptions
Returns
void
Inherited from
Call Signature
registerDomEvent<
K
>(el
,type
,callback
,options
?):void
Defined in: obsidian.d.ts:917
Registers an DOM event to be detached when unloading
Type Parameters
• K extends keyof HTMLElementEventMap
Parameters
el
type
K
callback
(this
, ev
) => any
options?
boolean
| AddEventListenerOptions
Returns
void
Inherited from
registerEvent()
registerEvent(
eventRef
):void
Defined in: obsidian.d.ts:902
Registers an event to be detached when unloading
Parameters
eventRef
Returns
void
Inherited from
registerInterval()
registerInterval(
id
):number
Defined in: obsidian.d.ts:924
Registers an interval (from setInterval) to be cancelled when unloading Use setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API
Parameters
id
number
Returns
number
Inherited from
registerScopeEvent()
registerScopeEvent(
keymapEventHandler
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:19
Parameters
keymapEventHandler
Returns
void
Inherited from
removeChild()
removeChild<
T
>(component
):T
Defined in: obsidian.d.ts:892
Removes a child component, unloading it
Type Parameters
• T extends Component
Parameters
component
T
Returns
T
Inherited from
revealInFolder()
revealInFolder(
file
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:161
Reveal a file or folder in the file tree
Parameters
file
Returns
void
setEphemeralState()
Call Signature
setEphemeralState(
state
):void
Defined in: obsidian.d.ts:4529
Parameters
state
unknown
Returns
void
Inherited from
Call Signature
setEphemeralState(
state
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:65
Set the ephemeral (non-persistent) state of the editor
Parameters
state
any
Returns
void
Inherited from
setIsAllCollapsed()
setIsAllCollapsed(
e
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:163
Parameters
e
unknown
Returns
void
setSortOrder()
setSortOrder(
order
):void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:168
Updates the sort order and sort by it
Parameters
order
unknown
The sort order
Returns
void
setState()
Call Signature
setState(
state
,result
):Promise
<void
>
Defined in: obsidian.d.ts:4521
Parameters
state
unknown
result
Returns
Promise
<void
>
Inherited from
Call Signature
setState(
state
,result
):Promise
<void
>
Defined in: src/obsidian/augmentations/Views/View.d.ts:73
Parameters
state
any
result
Returns
Promise
<void
>
Inherited from
sort()
sort():
void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:172
Sorts the file items in this view
Returns
void
startRenameFile()
startRenameFile(
e
):unknown
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:174
Parameters
e
unknown
Returns
unknown
unload()
unload():
void
Defined in: obsidian.d.ts:876
Unload this component and its children
Returns
void
Inherited from
updateConfig()
updateConfig():
void
Defined in: src/obsidian/internals/InternalPlugins/FileExplorer/FileExplorerView.d.ts:178
Reloads the config from vault and update all items
Returns
void