Classes
#
Interfaces#
Functions#
open▸ open(path
, openWith?
): Promise
<void
>
Opens a path or URL with the system's default app,
or the one specified with openWith
.
example
// opens the given URL on the default browser:
await open('https://github.com/tauri-apps/tauri')
// opens the given URL using `firefox`:
await open('https://github.com/tauri-apps/tauri', 'firefox')
// opens a file using the default program:
await open('/path/to/file')
#
ParametersName | Type | Description |
---|---|---|
path | string | The path or URL to open. |
openWith? | string | The app to open the file or URL with. Defaults to the system default application for the specified path type. |
#
ReturnsPromise
<void
>