Skip to content

ElectronShell

Unofficial

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

Import:

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

Signature:

export interface ElectronShell

Methods

Method Returns Description
beep() void Plays 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) ElectronShortcutDetails Resolves the shortcut link at shortcutPath. An exception is thrown when any error happens. Only available on Windows (win32).
showItemInFolder(fullPath) void Shows 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) boolean Creates or updates a shortcut link at shortcutPath. Only available on Windows (win32).
writeShortcutLink(shortcutPath, options) boolean Creates or updates a shortcut link at shortcutPath. Only available on Windows (win32).

Links to this page: