Skip to content

ElectronShell

Unofficial

Electron Shell for managing files and URLs using their default applications.

Import:

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

Signature:

export interface ElectronShell

Methods

MethodReturnsDescription
beep()voidPlays the system beep sound.
openExternal(url, options?)Promise<void>Opens the given external protocol URL in the desktop's default manner (for example, mailto: URLs in the user's default mail agent).
openPath(path)Promise<string>Opens the given file in the desktop's default manner.
readShortcutLink(shortcutPath)ElectronShortcutDetailsResolves the shortcut link at shortcutPath. An exception is thrown when any error happens. Only available on Windows (win32).
showItemInFolder(fullPath)voidShows the given file in a file manager. If possible, selects the file.
trashItem(path)Promise<void>Moves a path to the OS-specific trash location (Trash on macOS, Recycle Bin on Windows, and a desktop-environment-specific location on Linux).
writeShortcutLink(shortcutPath, operation, options)booleanCreates or updates a shortcut link at shortcutPath. Only available on Windows (win32).
writeShortcutLink(shortcutPath, options)booleanCreates or updates a shortcut link at shortcutPath. Only available on Windows (win32).

Links to this page: