-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Shell
zcbenz edited this page Oct 16, 2012
·
2 revisions
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.