Allocates a new buffer using an `array` of octets.
-### new Buffer(str, encoding = 'utf8')
+### new Buffer(str, encoding='utf8')
Allocates a new buffer containing the given `str`.
The shell that executed node should see the exit code as 1.
-### process.getgid(), process.setgid(id)
+### process.getgid()
-Gets/sets the group identity of the process. (See setgid(2).) This is the numerical group id, not the group name.
+Gets the group identity of the process. (See getgid(2).) This is the numerical group id, not the group name.
+
+ console.log('Current gid: ' + process.getgid());
+
+
+### process.setgid(id)
+
+Sets the group identity of the process. (See setgid(2).) This is the numerical group id, not the group name.
console.log('Current gid: ' + process.getgid());
try {
}
-### process.getuid(), process.setuid(id)
+### process.getuid()
+
+Gets the user identity of the process. (See getuid(2).) This is the numerical userid, not the username.
+
+ console.log('Current uid: ' + process.getuid());
+
+
+### process.setuid(id)
-Gets/sets the user identity of the process. (See setuid(2).) This is the numerical userid, not the username.
+Sets the user identity of the process. (See setuid(2).) This is the numerical userid, not the username.
console.log('Current uid: ' + process.getuid());
try {
## Timers
-### setTimeout(callback, delay, [arg, ...])
+### setTimeout(callback, delay, [arg], [...])
To schedule execution of `callback` after `delay` milliseconds. Returns a
`timeoutId` for possible use with `clearTimeout()`.
Prevents a timeout from triggering.
-### setInterval(callback, delay, [arg, ...])
+### setInterval(callback, delay, [arg], [...])
To schedule the repeated execution of `callback` every `delay` milliseconds.
Returns a `intervalId` for possible use with `clearInterval()`.
grep.stdin.end();
-### child_process.exec(command, [options, ] callback)
+### child_process.exec(command, [options], callback)
High-level way to execute a command as a child process, buffer the
output, and return it all in a callback.
### fs.stat(path, callback), fs.lstat(path, callback), fs.fstat(fd, callback)
-Asynchronous stat(2), lstat(2) or fstat(2). The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. It looks like this:
+Asynchronous stat(2). The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. It looks like this:
{ dev: 2049
, ino: 305352
See the `fs.Stats` section below for more information.
-### fs.statSync(path), fs.lstatSync(path), fs.fstatSync(fd)
+### fs.lstat(path, callback)
+
+Asynchronous lstat(2). The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object.
+
+### fs.fstat(fd, callback)
+
+Asynchronous fstat(2). The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object.
+
+### fs.statSync(path)
+
+Synchronous stat(2). Returns an instance of `fs.Stats`.
+
+### fs.lstatSync(path)
+
+Synchronous lstat(2). Returns an instance of `fs.Stats`.
+
+### fs.fstatSync(fd)
-Synchronous stat(2), lstat(2) or fstat(2). Returns an instance of `fs.Stats`.
+Synchronous fstat(2). Returns an instance of `fs.Stats`.
### fs.link(srcpath, dstpath, callback)
Synchronous version of `fs.read`. Returns the number of `bytesRead`.
-### fs.readFile(filename, [encoding,] callback)
+### fs.readFile(filename, [encoding], callback)
Asynchronously reads the entire contents of a file. Example:
If no encoding is specified, then the raw buffer is returned.
-### fs.readFileSync(filename [, encoding])
+### fs.readFileSync(filename, [encoding])
Synchronous version of `fs.readFile`. Returns the contents of the `filename`.
The synchronous version of `fs.writeFile`.
-### fs.watchFile(filename, [options,] listener)
+### fs.watchFile(filename, [options], listener)
Watch for changes on `filename`. The callback `listener` will be called each
time the file changes.
passed as the second parameter to the `'request'` event. It is a writable stream.
-### response.writeHead(statusCode[, reasonPhrase] , headers)
+### response.writeHead(statusCode, [reasonPhrase], headers)
Sends a response header to the request. The status code is a 3-digit HTTP
status code, like `404`. The last argument, `headers`, are the response headers.