Skip to content

Latest commit

 

History

History
62 lines (41 loc) · 1.78 KB

system.jsdoc.md

File metadata and controls

62 lines (41 loc) · 1.78 KB

System

'system' and execute port of ruby.

As JavaScript does not support back tick run, we have a method for that.

For node js only, does not work inside a browser.

System.run(command) → string

Run a system command synchronously and return the output (stdout/stderr).

Param Type
command string

System.system(command) → number

Run a system command synchronously and return the return code.

Param Type
command string

System.exec(command) → Object

Run a system command synchronously and return the child process Object.

Returns: Object - child process object

Param Type
command string

System.execDetached(command) → Object

Start a system command asynchronously and detach the process from the main process and return the child process Object.

Returns: Object - child process object

Param Type
command string

System.getUserName() → string

Get the current user name.

Fist checks for USER or USERNAME environment variable, after using operating system API.