Skip to main content

Table of contents

Classes#

Interfaces#

Functions#

open#

open(path: string, openWith?: string): 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')

Parameters:#

NameTypeDescription
pathstringThe path or URL to open.
openWith?stringThe app to open the file or URL with. Defaults to the system default application for the specified path type.

Returns: Promise<void>

Defined in: shell.ts:340