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.

fs.openSync()

fs.openSync(path, flags[, mode]) Synchronous version of fs.open(). Returns an integer representing the file descriptor.

fs.mkdirSync()

fs.mkdirSync(path[, mode]) Synchronous mkdir(2). Returns undefined.

fs.mkdtemp()

fs.mkdtemp(prefix, callback) Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. The created folder path is passed as a string to the callback's second parameter. Example: fs.mkdtemp('/tmp/foo-', (err, folder) => { console.log(folder); // Prints: /tmp/foo-itXde2 });

fs.mkdtempSync()

fs.mkdtempSync(template) The synchronous version of [fs.mkdtemp()][]. Returns the created folder path.

fs.mkdir()

fs.mkdir(path[, mode], callback) Asynchronous mkdir(2). No arguments other than a possible exception are given to the completion callback. mode defaults to 0o777.

fs.lstatSync()

fs.lstatSync(path) Synchronous lstat(2). Returns an instance of fs.Stats.

fs.lchown()

fs.lchown(path, uid, gid, callback) Asynchronous lchown(2). No arguments other than a possible exception are given to the completion callback.

fs.lchownSync()

fs.lchownSync(path, uid, gid) Synchronous lchown(2). Returns undefined.

fs.linkSync()

fs.linkSync(srcpath, dstpath) Synchronous link(2). Returns undefined.