Shell

external interface Shell(source)

Functions

Link copied to clipboard
abstract fun beep()

Play the beep sound.

Link copied to clipboard
abstract fun openExternal(url: String, options: OpenExternalOptions = definedExternally): Promise<Void>

Open the given external protocol URL in the desktop's default manner. (For example, mailto: URLs in the user's default mail agent).

Link copied to clipboard
abstract fun openPath(path: String): Promise<String>

Resolves with a string containing the error message corresponding to the failure if a failure occurred, otherwise "".

Link copied to clipboard
abstract fun readShortcutLink(shortcutPath: String): ShortcutDetails

Resolves the shortcut link at shortcutPath.

Link copied to clipboard
abstract fun showItemInFolder(fullPath: String)

Show the given file in a file manager. If possible, select the file.

Link copied to clipboard
abstract fun trashItem(path: String): Promise<Void>

Resolves when the operation has been completed. Rejects if there was an error while deleting the requested item.

Link copied to clipboard
abstract fun writeShortcutLink(shortcutPath: String, options: ShortcutDetails): Boolean
abstract fun writeShortcutLink(shortcutPath: String, operation: ShellWriteShortcutLinkOperation, options: ShortcutDetails): Boolean

Whether the shortcut was created successfully.