fs.symlinkSync()

fs.symlinkSync(target, path[, type]) Synchronous symlink(2). Returns undefined.

fs.symlink()

fs.symlink(target, path[, type], callback) Asynchronous symlink(2). 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 target argument will automatically be normalized to absolute path. Here is an example below: fs.

fs.truncate()

fs.truncate(path, len, callback) Asynchronous truncate(2). No arguments other than a possible exception are given to the completion callback. A file descriptor can also be passed as the first argument. In this case, fs.ftruncate() is called.

fs.stat()

fs.stat(path, callback) Asynchronous stat(2). The callback gets two arguments (err, stats) where stats is a fs.Stats object. See the fs.Stats section for more information.

fs.rmdirSync()

fs.rmdirSync(path) Synchronous rmdir(2). Returns undefined.

fs.Stats

Class: fs.Stats Objects returned from fs.stat(), fs.lstat() and fs.fstat() and their synchronous counterparts are of this type. stats.isFile() stats.isDirectory() stats.isBlockDevice() stats.isCharacterDevice() stats.isSymbolicLink() (only valid with fs.lstat()) stats.isFIFO() stats.isSocket() For a regular file util.inspect(stats) would return a string very similar to this: { dev: 2114, ino: 48064969, mode: 33188, nlink: 1, uid: 85, gid: 100, rdev: 0, size: 527, blksize:

fs.rmdir()

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

fs.readSync()

fs.readSync(fd, buffer, offset, length, position) Synchronous version of fs.read(). Returns the number of bytesRead.

fs.rename()

fs.rename(oldPath, newPath, callback) Asynchronous rename(2). No arguments other than a possible exception are given to the completion callback.

fs.renameSync()

fs.renameSync(oldPath, newPath) Synchronous rename(2). Returns undefined.