@tauri-apps/plugin-opener - v2.4.0
    Preparing search index...

    Function openPath

    • Opens a path with the system's default app, or the one specified with openWith.

      Parameters

      • path: string

        The path to open.

      • OptionalopenWith: string

        The app to open the path with. If not specified, defaults to the system default application for the specified path type.

      Returns Promise<void>

      import { openPath } from '@tauri-apps/plugin-opener';

      // opens a file using the default program:
      await openPath('/path/to/file');
      // opens a file using `vlc` command on Windows.
      await openPath('C:/path/to/file', 'vlc');

      2.0.0