shell
Provides functions related to desktop integration.
Functions
shell.showItemInFolder
showItemInFolder(path: string): Promise<void>
Show the given file in a file manager. If possible, select the file.
Example
shell.openURL
shell.openURL(url: string): Promise<void>
Open the url in the desktop’s default browser.
Example
shell.installedApps.query
shell.installedApps.query(filter?: string): Promise<AppDetail[]>
Query installed apps.
In the query
parameter, you can write this pattern:
startsWith:pattern
: to filter the app where the name starts withpattern
endsWith:pattern
: to filter the app where the name ends withpattern
exact:pattern
: to filter the app where the name is exactlypattern
Example
shell.installedApps.showInFolder
shell.installedApps.showInFolder(appId: string): Promise<void>
Show the installed app in a file manager.
Example
shell.installedApps.launch
shell.installedApps.launch(appId: string): Promise<boolean>
Launch the installed app. It will return true
if launch successfully.
Example
shell.installedApps.getIconURL
shell.installedApps.getIconURL(appId: string): string
Get the installed app icon URL.
Example
Types
shell.InstalledApps.AppDetail
Contains information about the installed app.
Property | Type | Description |
---|---|---|
name | string | The app’s name |
appId | string | The app’s id |
description | ?string | The app’s description |