NameDesc
abort()This causes node to emit an abort. This will cause node to exit and generate a core file.
addListener(event, listener)Adds a listener to the end of the listeners array for the specified event. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of event and listener will result in the listener being added multiple times. Returns emitter, so calls can be chained.
buf.compare(otherBuffer)Returns a number indicating whether this comes before or after or is the same as the otherBuffer in sort order.
buf.copy(targetBuffer[, targetStart][, sourceStart][, sourceEnd])Copies data from a region of this buffer to a region in the target buffer even if the target memory region overlaps with the source. If undefined the targetStart and sourceStart parameters default to 0 while sourceEnd defaults to buffer.length.
buf.equals(otherBuffer)Returns a boolean of whether this and otherBuffer have the same bytes.
buf.fill(value[, offset][, end])Fills the buffer with the specified value. If the offset (defaults to 0) and end (defaults to buffer.length) are not given it will fill the entire buffer.
buf.lengthThe size of the buffer in bytes. Note that this is not necessarily the size of the contents. length refers to the amount of memory allocated for the buffer object. It does not change when the contents of the buffer are changed.
buf.readDoubleBE(offset[, noAssert])Reads a 64 bit double from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readDoubleLE(offset[, noAssert])Reads a 64 bit double from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readFloatBE(offset[, noAssert])Reads a 32 bit float from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readFloatLE(offset[, noAssert])Reads a 32 bit float from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readInt16BE(offset[, noAssert])Reads a signed 16 bit integer from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readInt16LE(offset[, noAssert])Reads a signed 16 bit integer from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readInt32BE(offset[, noAssert])Reads a signed 32 bit integer from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readInt32LE(offset[, noAssert])Reads a signed 32 bit integer from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readInt8(offset[, noAssert])Reads a signed 8 bit integer from the buffer at the specified offset. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readIntBE(offset, byteLength[, noAssert])A generalized version of all numeric read methods. Supports up to 48 bits of accuracy.Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readIntLE(offset, byteLength[, noAssert])A generalized version of all numeric read methods. Supports up to 48 bits of accuracy.Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readUInt16BE(offset[, noAssert])Reads an unsigned 16 bit integer from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readUInt16LE(offset[, noAssert])Reads an unsigned 16 bit integer from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readUInt32BE(offset[, noAssert])Reads an unsigned 32 bit integer from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readUInt32LE(offset[, noAssert])Reads an unsigned 32 bit integer from the buffer at the specified offset with specified endian format. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readUInt8(offset[, noAssert])Reads an unsigned 8 bit integer from the buffer at the specified offset. Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readUIntBE(offset, byteLength[, noAssert])A generalized version of all numeric read methods. Supports up to 48 bits of accuracy.Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.readUIntLE(offset, byteLength[, noAssert])A generalized version of all numeric read methods. Supports up to 48 bits of accuracy.Set noAssert to true to skip validation of offset. This means that offset may be beyond the end of the buffer. Defaults to false.
buf.slice([start][, end])Returns a new buffer which references the same memory as the old, but offset and cropped by the start (defaults to 0) and end (defaults to buffer.length) indexes. Negative indexes start from the end of the buffer.
buf.toJSON()Returns a JSON-representation of the Buffer instance. JSON.stringify implicitly calls this function when stringifying a Buffer instance.
buf.toString([encoding][, start][, end])Decodes and returns a string from buffer data encoded using the specified character set encoding.
buf.write(string[, offset][, length][, encoding])Allocates a new buffer containing the given str. encoding defaults to 'utf8'.
buf.writeDoubleBE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid 64 bit double. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeDoubleLE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid 64 bit double. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeFloatBE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid 32 bit float. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeFloatLE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid 32 bit float. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeInt16BE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid signed 16 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeInt16LE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid signed 16 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeInt32BE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid signed 32 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeInt32LE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid signed 32 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeInt8(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid signed 8 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeIntBE(value, offset, byteLength[, noAssert])Writes value to the buffer at the specified offset and byteLength. Supports up to 48 bits of accuracy. Set noAssert to true to skip validation of value and offset. Defaults to false.
buf.writeIntLE(value, offset, byteLength[, noAssert])Writes value to the buffer at the specified offset and byteLength. Supports up to 48 bits of accuracy. Set noAssert to true to skip validation of value and offset. Defaults to false.
buf.writeUInt16BE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid unsigned 16 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeUInt16LE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid unsigned 16 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeUInt32BE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid unsigned 32 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeUInt32LE(value, offset[, noAssert])Writes value to the buffer at the specified offset with specified endian format. Note, value must be a valid unsigned 32 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeUInt8(value, offset[, noAssert])Writes value to the buffer at the specified offset. Note, value must be a valid unsigned 8 bit integer. Set noAssert to true to skip validation of value and offset. This means that value may be too large for the specific function and offset may be beyond the end of the buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness. Defaults to false.
buf.writeUIntBE(value, offset, byteLength[, noAssert])Writes value to the buffer at the specified offset and byteLength. Supports up to 48 bits of accuracy. Set noAssert to true to skip validation of value and offset. Defaults to false.
buf.writeUIntLE(value, offset, byteLength[, noAssert])Writes value to the buffer at the specified offset and byteLength. Supports up to 48 bits of accuracy. Set noAssert to true to skip validation of value and offset. Defaults to false.
buf[index]Get and set the octet at index. The values refer to individual bytes, so the legal range is between 0x00 and 0xFF hex or 0 and 255.
Buffer.byteLength(string[, encoding])Gives the actual byte length of a string. encoding defaults to 'utf8'. This is not the same as String.prototype.length since that returns the number of characters in a string.
Buffer.compare(buf1, buf2)The same as buf1.compare(buf2). Useful for sorting an Array of Buffers.
Buffer.concat(list[, totalLength])Returns a buffer which is the result of concatenating all the buffers in the list together.
Buffer.isBuffer(obj)Tests if obj is a Buffer.
Buffer.isEncoding(encoding)Returns true if the encoding is a valid encoding argument, or false otherwise.
console.assert(value[, message][, ...])Similar to assert.ok(), but the error message is formatted as util.format(message...).
console.dir(obj[, options])Uses util.inspect on obj and prints resulting string to stdout.
console.error([data][, ...])Prints to stderr with newline. This function can take multiple arguments in a printf()-like way.
console.info([data][, ...])Prints to stdout with newline. This function can take multiple arguments in a printf()-like way.
console.log([data][, ...])Prints to stdout with newline. This function can take multiple arguments in a printf()-like way.
console.time(label)Mark a time.
console.timeEnd(label)Finish timer, record output.
console.trace(message[, ...])Print to stderr 'Trace :', followed by the formatted message and stack trace to the current position.
console.warn([data][, ...])Prints to stderr with newline. This function can take multiple arguments in a printf()-like way
cwd()Returns the current working directory of the process.
dns.getServers()Returns an array of IP addresses as strings that are currently being used for resolution.
dns.lookup(hostname[, options], callback)Resolves a hostname (e.g. 'google.com') into the first found A (IPv4) or AAAA (IPv6) record. options can be an object or integer. If options is not provided, then IP v4 and v6 addresses are both valid. If options is an integer, then it must be 4 or 6.
dns.lookupService(address, port, callback)Resolves the given address and port into a hostname and service using getnameinfo.
dns.resolve(hostname[, rrtype], callback)Resolves a hostname (e.g. 'google.com') into an array of the record types specified by rrtype.
dns.resolve4(hostname, callback)The same as dns.resolve(), but only for IPv4 queries (A records). addresses is an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106']).
dns.resolve6(hostname, callback)The same as dns.resolve4() except for IPv6 queries (an AAAA query).
dns.resolveCname(hostname, callback)The same as dns.resolve(), but only for canonical name records (CNAME records). addresses is an array of the canonical name records available for hostname (e.g., ['bar.example.com']).
dns.resolveMx(hostname, callback)The same as dns.resolve(), but only for mail exchange queries (MX records).
dns.resolveNs(hostname, callback)The same as dns.resolve(), but only for name server records (NS records). addresses is an array of the name server records available for hostname (e.g., ['ns1.example.com', 'ns2.example.com']).
dns.resolveSoa(hostname, callback)The same as dns.resolve(), but only for start of authority record queries (SOA record).
dns.resolveSrv(hostname, callback)The same as dns.resolve(), but only for service records (SRV records). addresses is an array of the SRV records available for hostname. Properties of SRV records are priority, weight, port, and name (e.g., [{'priority': 10, 'weight': 5, 'port': 21223, 'name': 'service.example.com'}, ...]).
dns.resolveTxt(hostname, callback)The same as dns.resolve(), but only for text queries (TXT records). addresses is an 2-d array of the text records available for hostname (e.g., [ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]). Each sub-array contains TXT chunks of one record. Depending on the use case, the could be either joined together or treated separately.
dns.reverse(ip, callback)Reverse resolves an ip address to an array of hostnames.
dns.setServers(servers)Given an array of IP addresses as strings, set them as the servers to use for resolving.
domain.add(emitter)Explicitly adds an emitter to the domain. If any event handlers called by the emitter throw an error, or if the emitter emits an error event, it will be routed to the domain's error event, just like with implicit binding.
domain.bind(callback)The returned function will be a wrapper around the supplied callback function. When the returned function is called, any errors that are thrown will be routed to the domain's error event.
domain.dispose()Once dispose has been called, the domain will no longer be used by callbacks bound into the domain via run, bind, or intercept, and a dispose event is emit
domain.enter()The enter method is plumbing used by the run, bind, and intercept methods to set the active domain. It sets domain.active and process.domain to the domain, and implicitly pushes the domain onto the domain stack managed by the domain module (see domain.exit() for details on the domain stack). The call to enter delimits the beginning of a chain of asynchronous calls and I/O operations bound to a domain.
domain.exit()The exit method exits the current domain, popping it off the domain stack. Any time execution is going to switch to the context of a different chain of asynchronous calls, it's important to ensure that the current domain is exited. The call to exit delimits either the end of or an interruption to the chain of asynchronous calls and I/O operations bound to a domain.
domain.intercept(callback)This method is almost identical to domain.bind(callback). However, in addition to catching thrown errors, it will also intercept Error objects sent as the first argument to the function.
domain.remove(emitter)The opposite of domain.add(emitter). Removes domain handling from the specified emitter.
domain.run(function)Run the supplied function in the context of the domain, implicitly binding all event emitters, timers, and lowlevel requests that are created in that context.This is the most basic way to use a domain.
emit(event, [arg1], [arg2], [...])Execute each of the listeners in order with the supplied arguments. Returns true if event had listeners, false otherwise.
exit([code])Ends the process with the specified code. If omitted, exit uses the 'success' code 0.
fs.access(path[, mode], callback)Tests a user's permissions for the file specified by path. mode is an optional integer that specifies the accessibility checks to be performed.
fs.accessSync(path[, mode])Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise.
fs.appendFile(filename, data[, options], callback)Asynchronously append data to a file, creating the file if it not yet exists. data can be a string or a buffer.
fs.appendFileSync(filename, data[, options])The synchronous version of fs.appendFile.
fs.close(fd, callback)Asynchronous close(). No arguments other than a possible exception are given to the completion callback.
fs.closeSync(fd)Synchronous close().
fs.createReadStream(path[, options])Returns a new ReadStream object.
fs.createWriteStream(path[, options])Returns a new WriteStream object.
fs.exists(path, callback)Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false.
fs.existsSync(path)Synchronous version of fs.exists.
fs.fchmod(fd, mode, callback)Asynchronous fchmod(). No arguments other than a possible exception are given to the completion callback.
fs.fchmodSync(fd, mode)Synchronous fchmod().
fs.fchown(fd, uid, gid, callback)Asynchronous fchown(). No arguments other than a possible exception are given to the completion callback.
fs.fchownSync(fd, uid, gid)Synchronous fchown()
fs.fstat(fd, callback)Asynchronous fstat(). The callback gets two arguments (err, stats) where stats is a fs.Stats object. fstat() is identical to stat(), except that the file to be stat-ed is specified by the file descriptor fd.
fs.fstatSync(fd)Synchronous fstat(). Returns an instance of fs.Stats.
fs.fsync(fd, callback)Asynchronous fsync(2). No arguments other than a possible exception are given to the completion callback.
fs.fsyncSync(fd)Synchronous fsync(2).
fs.ftruncate(fd, len, callback)Asynchronous ftruncate(). No arguments other than a possible exception are given to the completion callback.
fs.ftruncateSync(fd, len)Synchronous ftruncate()
fs.futimes(fd, atime, mtime, callback)Change the file timestamps of a file referenced by the supplied file descriptor.
fs.futimesSync(fd, atime, mtime)Change the file timestamps of a file referenced by the supplied file descriptor.
fs.chmod(path, mode, callback)Asynchronous chmod(). No arguments other than a possible exception are given to the completion callback.
fs.chmodSync(path, mode)Synchronous chmod().
fs.chown(path, uid, gid, callback)Asynchronous chown(). No arguments other than a possible exception are given to the completion callback.
fs.chownSync(path, uid, gid)Synchronous chown()
fs.lchmod(path, mode, callback)Asynchronous lchmod(). No arguments other than a possible exception are given to the completion callback.Only available on Mac OS X.
fs.lchmodSync(path, mode)Synchronous lchmod().
fs.lchown(path, uid, gid, callback)Asynchronous lchown(). No arguments other than a possible exception are given to the completion callback.
fs.lchownSync(path, uid, gid)Synchronous lchown()
fs.link(srcpath, dstpath, callback)Asynchronous link(). No arguments other than a possible exception are given to the completion callback.
fs.linkSync(srcpath, dstpath)Synchronous link().
fs.lstat(path, callback)Asynchronous lstat(). The callback gets two arguments (err, stats) where stats is a fs.Stats object. lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is stat-ed, not the file that it refers to.
fs.lstatSync(path)Synchronous lstat(). Returns an instance of fs.Stats.
fs.mkdir(path[, mode], callback)SAsynchronous mkdir(2). No arguments other than a possible exception are given to the completion callback. mode defaults to 0777.
fs.mkdirSync(path[, mode])Synchronous mkdir().
fs.open(path, flags[, mode], callback)Asynchronous file open.
fs.openSync(path, flags[, mode])Synchronous version of fs.open().
fs.read(fd, buffer, offset, length, position, callback)Read data from the file specified by fd.
fs.readdir(path, callback)Asynchronous readdir(3). Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'.
fs.readdirSync(path)Synchronous readdir(). Returns an array of filenames excluding '.' and '..'.
fs.readFile(filename[, options], callback)Asynchronously reads the entire contents of a file.
fs.readFileSync(filename[, options])Synchronous version of fs.readFile. Returns the contents of the filename.
fs.readlink(path, callback)Asynchronous readlink(). The callback gets two arguments (err, linkString).
fs.readSync(fd, buffer, offset, length, position)Synchronous version of fs.read. Returns the number of bytesRead.
fs.realpath(path[, cache], callback)Asynchronous realpath(). The callback gets two arguments (err, resolvedPath). May use process.cwd to resolve relative paths. cache is an object literal of mapped paths that can be used to force a specific path resolution or avoid additional fs.stat calls for known real paths.
fs.realpathSync(path[, cache])Synchronous realpath(). Returns the resolved path.
fs.rename(oldPath, newPath, callback)Asynchronous rename(). No arguments other than a possible exception are given to the completion callback.
fs.rmdir(path, callback)Asynchronous rmdir(). No arguments other than a possible exception are given to the completion callback.
fs.rmdirSync(path)Synchronous rmdir().
fs.stat(path, callback)Asynchronous stat(). The callback gets two arguments (err, stats) where stats is a fs.Stats object.
fs.statSync(path)Synchronous stat(). Returns an instance of fs.Stats.
fs.symlink(srcpath, dstpath[, type], callback)Asynchronous symlink(). No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default is 'file') and is only available on Windows (ignored on other platforms). Note that Windows junction points require the destination path to be absolute. When using 'junction', the destination argument will automatically be normalized to absolute path.
fs.symlink(srcpath, dstpath[, type], callback)Asynchronous symlink(). No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default is 'file') and is only available on Windows (ignored on other platforms). Note that Windows junction points require the destination path to be absolute. When using 'junction', the destination argument will automatically be normalized to absolute path.
fs.symlinkSync(srcpath, dstpath[, type])Synchronous symlink().
fs.truncate(path, len, callback)Asynchronous truncate(). No arguments other than a possible exception are given to the completion callback.
fs.truncateSync(path, len)Synchronous truncate()
fs.unlink(path, callback)Asynchronous unlink(). No arguments other than a possible exception are given to the completion callback.
fs.unlinkSync(path)Synchronous unlink().
fs.unwatchFile(filename[, listener])Stop watching for changes on filename. If listener is specified, only that particular listener is removed. Otherwise, all listeners are removed and you have effectively stopped watching filename.
fs.utimes(path, atime, mtime, callback)Change file timestamps of the file referenced by the supplied path.
fs.utimesSync(path, atime, mtime)Change file timestamps of the file referenced by the supplied path.
fs.watch(filename[, options][, listener])Watch for changes on filename, where filename is either a file or a directory. The returned object is a fs.FSWatcher.
fs.watchFile(filename[, options], listener)Watch for changes on filename. The callback listener will be called each time the file is accessed.
fs.write(fd, buffer, offset, length[, position], callback)Write buffer to the file specified by fd.
fs.write(fd, data[, position[, encoding]], callback)Write data to the file specified by fd. If data is not a Buffer instance then the value will be coerced to a string.
fs.writeFile(filename, data[, options], callback)Asynchronously writes data to a file, replacing the file if it already exists. data can be a string or a buffer.
fs.writeFileSync(filename, data[, options])The synchronous version of fs.writeFile.
fs.writeSync(fd, buffer, offset, length[, position])Synchronous versions of fs.write(). Returns the number of bytes written.
fs.writeSync(fd, data[, position[, encoding]])Synchronous versions of fs.write(). Returns the number of bytes written.
getgid()Gets the group identity of the process. This is the numerical group id, not the group name.This function is only available on POSIX platforms (i.e. not Windows, Android).
getgroups()Returns an array with the supplementary group IDs. POSIX leaves it unspecified if the effective group ID is included but node.js ensures it always is.This function is only available on POSIX platforms (i.e. not Windows, Android).
getuid()Gets the user identity of the process. This is the numerical id, not the username.This function is only available on POSIX platforms (i.e. not Windows, Android).
hrtime()Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array. It is relative to an arbitrary time in the past. It is not related to the time of day and therefore not subject to clock drift. The primary use is for measuring performance between intervals.
chdir(directory)Changes the current working directory of the process or throws an exception if that fails.
initgroups(user, extra_group)Reads /etc/group and initializes the group access list, using all groups of which the user is a member. This is a privileged operation, meaning you need to be root or have the CAP_SETGID capability.This function is only available on POSIX platforms (i.e. not Windows, Android).
kill(pid[, signal])Send a signal to a process. pid is the process id and signal is the string describing the signal to send. Signal names are strings like 'SIGINT' or 'SIGHUP'. If omitted, the signal will be 'SIGTERM'.
listenerCount(emitter, event)Return the number of listeners for a given event.
listeners(event)Returns an array of listeners for the specified event.
memoryUsage()Returns an object describing the memory usage of the Node process measured in bytes.
net.connect(options[, connectionListener])A factory method, which returns a new 'net.Socket' and connects to the supplied address and port.
net.connect(path[, connectListener])Creates unix socket connection to path. The connectListener parameter will be added as an listener for the 'connect' event. A factory method which returns a new 'net.Socket'.
net.connect(port[, host][, connectListener])Creates a TCP connection to port on host. If host is omitted, 'localhost' will be assumed. The connectListener parameter will be added as an listener for the 'connect' event. Is a factory method which returns a new 'net.Socket'.
net.createConnection(options[, connectionListener])A factory method, which returns a new 'net.Socket' and connects to the supplied address and port.
net.createConnection(path[, connectListener])Creates unix socket connection to path. The connectListener parameter will be added as an listener for the 'connect' event. A factory method which returns a new 'net.Socket'.
net.createConnection(port[, host][, connectListener])Creates a TCP connection to port on host. If host is omitted, 'localhost' will be assumed. The connectListener parameter will be added as an listener for the 'connect' event. Is a factory method which returns a new 'net.Socket'.
net.createServer([options][, connectionListener])Creates a new TCP server. The connectionListener argument is automatically set as a listener for the 'connection' event.
net.isIP(input)Tests if input is an IP address. Returns 0 for invalid strings, returns 4 for IP version 4 addresses, and returns 6 for IP version 6 addresses.
net.isIPv4(input)Returns true if input is a version 4 IP address, otherwise returns false.
net.isIPv6(input)Returns true if input is a version 6 IP address, otherwise returns false.
new Buffer(buffer)Copies the passed buffer data onto a new Buffer instance.
new Buffer(size)Allocates a new buffer of size octets. Note, size must be no more than kMaxLength. Otherwise, a RangeError will be thrown here.
new Buffer(str[, encoding])Allocates a new buffer containing the given str. encoding defaults to 'utf8'.
new net.Socket([options])Construct a new socket object.
newListenerThis event is emitted any time a listener is added. When this event is triggered, the listener may not yet have been added to the array of listeners for the event.
nextTick(callback)Once the current event loop turn runs to completion, call the callback function.
on(event, listener)Adds a listener to the end of the listeners array for the specified event. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of event and listener will result in the listener being added multiple times. Returns emitter, so calls can be chained.
once(event, listener)Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed. Returns emitter, so calls can be chained.
os.arch()Returns the operating system CPU architecture. Possible values are "x64", "arm" and "ia32".
os.cpus()Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).
os.endianness()Returns the endianness of the CPU. Possible values are "BE" or "LE".
os.EOLA constant defining the appropriate End-of-line marker for the operating system.
os.freemem()Returns the amount of free system memory in bytes.
os.hostname()Returns the hostname of the operating system.
os.loadavg()Returns an array containing the 1, 5, and 15 minute load averages.
os.networkInterfaces()Get a list of network interfaces.
os.platform()Returns the operating system platform.
os.release()Returns the operating system release.
os.tmpdir()Returns the operating system's default directory for temp files.
os.totalmem()Returns the total amount of system memory in bytes.
os.type()Returns the operating system name.
os.uptime()Returns the system uptime in seconds.
path.basename(p[, ext])Return the last portion of a path. Similar to the Unix basename command.
path.dirname(p)Return the directory name of a path. Similar to the Unix dirname command.
path.extname(p)Return the extension of the path, from the last '.' to end of string in the last portion of the path. If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
path.format(pathObject)Returns a path string from an object, the opposite of path.parse above.
path.isAbsolute(path)Determines whether path is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
path.join([path1][, path2][, ...])Join all arguments together and normalize the resulting path.
path.normalize(p)Normalize a string path, taking care of '..' and '.' parts.
path.parse(pathString)Returns an object from a path string.
path.relative(from, to)Solve the relative path from from to to.
path.resolve([from ...], to)Resolves to to an absolute path.
removeAllListeners([event])Removes all listeners, or those of the specified event. It's not a good idea to remove listeners that were added elsewhere in the code, especially when it's on an emitter that you didn't create (e.g. sockets or file streams). Returns emitter, so calls can be chained.
removeListenerThis event is emitted any time someone removes a listener. When this event is triggered, the listener may not yet have been removed from the array of listeners for the event.
removeListener(event, listener)Remove a listener from the listener array for the specified event. Caution: changes array indices in the listener array behind the listener. removeListener will remove, at most, one instance of a listener from the listener array. If any single listener has been added multiple times to the listener array for the specified event, then removeListener must be called multiple times to remove each instance. Returns emitter, so calls can be chained.
server.address()Returns the bound address, the address family name and port of the server as reported by the operating system.
server.close([callback])finally closed when all connections are ended and the server emits a 'close' event.
server.getConnections(callback)Asynchronously get the number of concurrent connections on the server. Works when sockets were sent to forks. Callback should take two arguments err and count.
server.listen(handle[, callback])The handle object can be set to either a server or socket (anything with an underlying _handle member), or a {fd: } object. This will cause the server to accept connections on the specified handle, but it is presumed that the file descriptor or handle has already been bound to a port or domain socket. Listening on a file descriptor is not supported on Windows.
server.listen(options[, callback])The port, host, and backlog properties of options, as well as the optional callback function, behave as they do on a call to server.listen(port, [host], [backlog], [callback]) . Alternatively, the path option can be used to specify a UNIX socket.
server.listen(path[, callback])Start a local socket server listening for connections on the given path.
server.listen(port[, host][, backlog][, callback])Begin accepting connections on the specified port and host. If the host is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). A port value of zero will assign a random port.
server.ref()Opposite of unref, calling ref on a previously unrefd server will not let the program exit if it's the only server left (the default behavior). If the server is refd calling ref again will have no effect.
server.unref()Calling unref on a server will allow the program to exit if this is the only active server in the event system. If the server is already unrefd calling unref again will have no effect.
setgid(id)Sets the group identity of the process. (See setgid(2).) This accepts either a numerical ID or a groupname string. If a groupname is specified, this method blocks while resolving it to a numerical ID.This function is only available on POSIX platforms (i.e. not Windows, Android).
setgroups(groups)Sets the supplementary group IDs. This is a privileged operation, meaning you need to be root or have the CAP_SETGID capability.This function is only available on POSIX platforms (i.e. not Windows, Android).
setMaxListeners(n)By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that to be increased. Set to zero for unlimited.
setuid(id)Sets the user identity of the process. (See setgid(2).) This accepts either a numerical ID or a username string. If a username is specified, this method blocks while resolving it to a numerical ID.This function is only available on POSIX platforms (i.e. not Windows, Android).
socket.address()Returns the bound address, the address family name and port of the socket as reported by the operating system. Returns an object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }.
socket.connect(path[, connectListener])Opens the connection for a given socket. If port and host are given, then the socket will be opened as a TCP socket, if host is omitted, localhost will be assumed. If a path is given, the socket will be opened as a unix socket to that path.
socket.connect(port[, host][, connectListener])Opens the connection for a given socket. If port and host are given, then the socket will be opened as a TCP socket, if host is omitted, localhost will be assumed. If a path is given, the socket will be opened as a unix socket to that path.
socket.destroy()Ensures that no more I/O activity happens on this socket. Only necessary in case of errors (parse error or so).
socket.end([data][, encoding])Half-closes the socket. i.e., it sends a FIN packet. It is possible the server will still send some data.
socket.pause()Pauses the reading of data. That is, 'data' events will not be emitted. Useful to throttle back an upload.
socket.ref()Opposite of unref, calling ref on a previously unrefd socket will not let the program exit if it's the only socket left (the default behavior). If the socket is refd calling ref again will have no effect.
socket.resume()Resumes reading after a call to pause().
socket.setEncoding([encoding])Set the encoding for the socket as a Readable Stream.
socket.setKeepAlive([enable][, initialDelay])Enable/disable keep-alive functionality, and optionally set the initial delay before the first keepalive probe is sent on an idle socket. enable defaults to false.
socket.setNoDelay([noDelay])Disables the Nagle algorithm. By default TCP connections use the Nagle algorithm, they buffer data before sending it off. Setting true for noDelay will immediately fire off data each time socket.write() is called. noDelay defaults to true.
socket.setTimeout(timeout[, callback])Sets the socket to timeout after timeout milliseconds of inactivity on the socket. By default net.Socket do not have a timeout.
socket.unref()Calling unref on a socket will allow the program to exit if this is the only active socket in the event system. If the socket is already unrefd calling unref again will have no effect.
socket.write(data[, encoding][, callback])Sends data on the socket. The second parameter specifies the encoding in the case of a string--it defaults to UTF8 encoding.
umask([mask])Sets or reads the process's file mode creation mask. Child processes inherit the mask from the parent process. Returns the old mask if mask argument is given, otherwise returns the current mask.
uptime()Number of seconds Node has been running.

Comments and questions

Publish comment or question

Copyright 2018 © ELTASK.COM
All rights reserved.