open
이 콘텐츠는 아직 번역되지 않았습니다.
Module @netwiv/api/plugins/shell · Kind Function
import { open } from '@netwiv/api/plugins/shell';Opens a path or URL with the system’s default app,
or the one specified with openWith.
The openWith value must be one of firefox, google chrome, chromium safari,
open, start, xdg-open, gio, gnome-open, kde-open or wslview.
Signature
Section titled “Signature”function open(path: string, openWith?: string | undefined): Promise<void>Example
Section titled “Example”import { open } from '@netwiv/api/plugins/shell';// 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');Upstream since 2.0.0
Descriptions come from the pinned @tauri-apps/plugin-shell@2.3.6 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.