Module shell

Module shell 

Source
Expand description

Access to the system shell. Allows running external programs, open Shell (File Explorer / Finder) windows at different locations as well as launching external applications based on file type associations.

§Synopsis

// Open URL with default browser.
nw_sys::shell::open_external("https://github.com/nwjs/nw.js");

// Open a text file with default text editor.
nw_sys::shell::open_item("/absolute/path/to/file.txt");

// Show a file in parent folder with file manager.
nw_sys::shell::show_item_in_folder("/absolute/path/to/file.txt");

Functions§

open_external
Open the given external URI in the desktop’s default manner.
open_item
Open the given file_path in the desktop’s default manner.
show_item_in_folder
Show the given file_path in the parent folder with file manager.