fs.createReadStream()

fs.createReadStream(path[, options]) Returns a new ReadStream object. (See Readable Stream). Be aware that, unlike the default value set for highWaterMark on a readable stream (16 kb), the stream returned by this method has a default value of 64 kb for the same parameter. options is an object or string with the following defaults: { flags: 'r', encoding: null, fd: null, mode: 0o666, autoClose: true } options can include start and end values to read a range of bytes from the file in

fs.unwatchFile()

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. Calling fs.unwatchFile() with a filename that is not being watched is a no-op, not an error. Note: fs.watch() is more efficient than fs.watchFile() and fs.unwatchFile(). fs.watch() should be used instead of fs.watchFile() and fs.unwatchFile() when possible.

zlib.DeflateRaw

Class: zlib.DeflateRaw Compress data using deflate, and do not append a zlib header.

process.getuid()

process.getuid() Note: this function is only available on POSIX platforms (i.e. not Windows, Android) Gets the user identity of the process. (See getuid(2).) This is the numerical userid, not the username. if (process.getuid) { console.log(`Current uid: ${process.getuid()}`); }

dns.resolve()

dns.resolve(hostname[, rrtype], callback) Uses the DNS protocol to resolve a hostname (e.g. 'nodejs.org') into an array of the record types specified by rrtype. Valid values for rrtype are: 'A' - IPV4 addresses, default 'AAAA' - IPV6 addresses 'MX' - mail exchange records 'TXT' - text records 'SRV' - SRV records 'PTR' - used for reverse IP lookups 'NS' - name server records 'CNAME' - canonical name records 'SOA' - start of authority record The callback function has arguments (err,

message.statusCode

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

cipher.setAutoPadding()

cipher.setAutoPadding(auto_padding=true) When using block encryption algorithms, the Cipher class will automatically add padding to the input data to the appropriate block size. To disable the default padding call cipher.setAutoPadding(false). When auto_padding is false, the length of the entire input data must be a multiple of the cipher's block size or cipher.final() will throw an Error. Disabling automatic padding is useful for non-standard padding, for instance using 0x0 instead of PKCS pa

process.versions

process.versions A property exposing version strings of Node.js and its dependencies. console.log(process.versions); Will print something like: { http_parser: '2.3.0', node: '1.1.1', v8: '4.1.0.14', uv: '1.3.0', zlib: '1.2.8', ares: '1.10.0-DEV', modules: '43', icu: '55.1', openssl: '1.0.1k' }

fs.exists()

fs.exists(path, callback) Stability: 0 - Deprecated: Use fs.stat() or fs.access() instead. Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false. Example: fs.exists('/etc/passwd', (exists) => { console.log(exists ? 'it\'s there' : 'no passwd!'); }); fs.exists() should not be used to check if a file exists before calling fs.open(). Doing so introduces a race condition since other processes may change the file's

fs.readFile()

fs.readFile(file[, options], callback) file <String> | <Integer> filename or file descriptor options <Object> | <String> encoding <String> | <Null> default = null flag <String> default = 'r' callback <Function> Asynchronously reads the entire contents of a file. Example: fs.readFile('/etc/passwd', (err, data) => { if (err) throw err; console.log(data); }); The callback is passed two arguments (err, data), where data is the conten