-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Shell
Cong Liu edited this page Mar 30, 2016
·
2 revisions
NOTE: some content in this wiki applies only to 0.12 and earlier versions. For official documentation on 0.13 and later, see http://docs.nwjs.io
Shell API requires node-webkit >= v0.3.0
Shell
is a collection of APIs that do desktop related jobs.
// Load native UI library.
var gui = require('nw.gui');
// Open URL with default browser.
gui.Shell.openExternal('https://github.com/rogerwang/node-webkit');
// Open a text file with default text editor.
gui.Shell.openItem('test.txt');
// Open a file in file explorer.
gui.Shell.showItemInFolder('test.txt');
Open the given external protocol URI
in the desktop's default manner. (For example, mailto: URLs in the default mail user agent.)
Open the given file_path
in the desktop's default manner.
Show the given file_path
in a file manager. If possible, select the file.