system

System is a module to retrieve some system informations.

var system = require('system')

args

An array containing a list of arguments on the command line given to the script. The first one (at index 0) is always the script name.

var numberOfArg = system.args.length;
var thirdArgument = system.args[2];

os

An object having information about the operating system. Here are its properties:

  • system.os.name: the name of the operating system
  • system.os.architecture: its architecture : 32bit, 64bit...
  • system.os.version: its version
  • system.os.isWindows: boolean indicating if it is windows (SlimerJS only)

pid

Always returns 0 (no Mozilla API to retrieve the PID)

platform

Returns "slimerjs".

env

An object containing values of all environment variable.

var myHome = system.env['HOME'];

stdout

  • system.stdout.write('something')
  • system.stdout.writeLine('something')

Table Of Contents

Previous topic

webpage

Next topic

webserver

This Page