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.statSync()

fs.statSync(path) Synchronous stat(2). Returns an instance of fs.Stats.

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.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.rmdir()

fs.rmdir(path, callback) Asynchronous rmdir(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.

fs.rename()

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

fs.realpathSync()

fs.realpathSync(path[, cache]) Synchronous realpath(2). Returns the resolved path. 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.