fs.watch()

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. The second argument is optional. The options if provided should be an object. The supported boolean members are persistent and recursive. persistent indicates whether the process should continue to run as long as files are being watched. recursive indicates whether all subdirectories should be watched, or only the current directory. Thi

buffer.length

buf.length <Number> Returns the amount of memory allocated for the Buffer in number of bytes. Note that this does not necessarily reflect the amount of usable data within the Buffer. For instance, in the example below, a Buffer with 1234 bytes is allocated, but only 11 ASCII bytes are written. const buf = Buffer.allocUnsafe(1234); console.log(buf.length); // Prints: 1234 buf.write('some string', 0, 'ascii'); console.log(buf.length); // Prints: 1234 While the length property is no

fs.fchmodSync()

fs.fchmodSync(fd, mode) Synchronous fchmod(2). Returns undefined.

domain.exit()

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. If there are multiple, nested domains bound to the current execution context, exit will exit any domains nested with

os.tmpdir()

os.tmpdir() Returns the operating system's default directory for temporary files.

message.statusCode

message.statusCode Only valid for response obtained from http.ClientRequest. The 3-digit HTTP response status code. E.G. 404.

net_server.listen()

server.listen(handle[, backlog][, callback]) handle <Object> backlog <Number> callback <Function> The handle object can be set to either a server or socket (anything with an underlying _handle member), or a {fd: <n>} 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.

path.normalize()

path.normalize(p) Normalize a string path, taking care of '..' and '.' parts. When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. Example: path.normalize('/foo/bar//baz/asdf/quux/..') // returns '/foo/bar/baz/asdf' Note: If the path string passed as argument is a zero-length string then '.' will be returned, which represents the current working directory.

fs.open()

fs.open(path, flags[, mode], callback) Asynchronous file open. See open(2). flags can be: 'r' - Open file for reading. An exception occurs if the file does not exist. 'r+' - Open file for reading and writing. An exception occurs if the file does not exist. 'rs' - Open file for reading in synchronous mode. Instructs the operating system to bypass the local file system cache. This is primarily useful for opening files on NFS mounts as it allows you to skip the potentially stale local cache.

buffer.readUInt32LE()

buf.readUInt32LE(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 4 noAssert <Boolean> Default: false Return: <Number> Reads an unsigned 32-bit integer from the Buffer at the specified offset with specified endian format (readInt32BE() returns big endian, readInt32LE() returns little endian). Setting noAssert to true skips validation of the offset. This allows the offset to be beyond the end of the Buffer. Example: const buf = Buffer.from([0x3, 0x