Draxt is an open-source utility module for selecting and manipulating filesystem objects in a Node.js environment. It uses glob patterns as its "selector engine" to select filesytem objects (files, directories, ...).

Draxt also provides several DOM-like interfaces representing filesystem objects which build on promisified APIs for the fs and fs-extra.

Writing readble and maintable code by using node fs module is not an easy task. One usually has to write helper structures for doing basic and common tasks. Draxt is an attempt for faciliating this process. The library, in addition to wrappers for promisified fs and fs-extra module APIs, provides several DOM/jQuery-like APIs for selecting and manipulating files and directories and traversing filesystem.

The project is hosted on GitHub. You can report bugs and discuss features on the issues page.

draxt module exports a constructor function. Whenever a string is passed as the first parameter to the function, parameters are passed to the glob package. The matching pathNames returned by the glob package, if any, are converted into an array of node instances. The returned value of draxt is a draxt instance (a draxt collection) which wraps an array of nodes. In this respect, draxt constructor function works like jQuery function, but unlike jQuery collections, draxt collections are not array-like objects. draxt collections store the array of nodes as a property named items . The length property of draxt collections is a getter for the collection's items.length property.

// Let's use a familiar variable name! const $ = require('draxt') // glob options const globOptions = { dot: true } // using await syntax in an async function context (async () => { const draxtCollection = await $('/example_pattern/**', globOptions) })() // using promises $('/example_pattern/**').then(draxtCollection => { // ... }) // synchronous query const draxtCollection = $.sync('/example_pattern/**', globOptions)

draxt function is the main method of draxt package. The function can be called with new as a constructor function (not recommended) and without new as a factory function. draxt uses promisified glob package as it's selector engine. All query results of glob package are converted into one of Node 's sub-class ( File , Directory or SymbolicLink ) instances by analyzing pathNames' fs.Stats object. The returned value of draxt is a draxt collection which to some extent works like jQuery collections but unlike jQuery collections it's not an array-like object. The collection items are stored as an array property ( .items ).

const draxtCollection = draxt([pattern, options])

pattern ( string | array.<node> | node | draxt ) – pattern parameter can contain several values: string which is passed to glob package as glob pattern. In this case draxt returns a promise object representing a draxt collection/instance. A Node or one it's sub-classes ( File , Directory or SymbolicLink ) instance. In this case a draxt collection containing the passed node is returned. An array of node instances. A draxt collection to clone (shallow). undefined which returns an empty draxt collection.

( | | | ) – parameter can contain several values: options ( object | string ) – Options for glob package. The options parameter can also be a string representing a pathName which will be used as context for the query, similar to jQuery's $(selector, context) syntax.

→ promise.<draxt> | draxt

sync draxt.sync(pattern [, options]) pattern ( string ) – Glob pattern.

( ) – Glob pattern. options ( object ) – Options for glob package. Synchronously query the file system by using glob package and return a new draxt collection. draxt An instance of An instance of draxt , a.k.a. a draxt collection. source

extend draxt.extend(methods) methods ( object ) Extend draxt by adding methods to it's prototype . Basically works like jQuery.fn.extend . source

add draxtCollection.add(items) items ( node | array.<node> | draxt ) – Instance of Node or array of nodes or a draxt collection. Add node(s) to current draxt collection. Pre-exising nodes will not be added to the collection. const draxtCollection = draxt(); draxtCollection.add(new Node('/pathName')); draxtCollection.length // → 1 draxt An instance of An instance of draxt source

get draxtCollection.get([index]) index ( number ) – Index of node in items collection. Get one or all nodes from the draxt collection. With an index specified, .get(index) retrieves a single node otherwise retrives all the nodes (if any). → array.<node> | node | undefined source

first draxtCollection.first() Get the first node (if any) from the collection. → node | undefined source

last draxtCollection.last() Get the last node (if any) from the collection. → node | undefined source

has draxtCollection.has(item) item ( string | node ) – A Node instance or a pathName Does the draxt collection has a node with specified pathName? Note that .has() method doesn't work by checking if collection has a specific Node instance. It checks whether collection has a node with the specified pathName. // example fs structure // └── app // ├── public // │ ├── script.js // │ └── style.css const collection = draxtCollection.sync('/app/**'); draxtCollection.has('/app/public/script.js') // → true draxtCollection.has(new Node('/app/public/script.js')) // → true → boolean source

slice draxtCollection.slice([begin, end]) begin ( integer ) – Zero-based index at which to begin extraction.

( ) – Zero-based index at which to begin extraction. end ( integer ) – Zero-based index before which to end extraction. slice extracts up to but not including end . Slice the collection and return a new Draxt collection. Uses Array.prototype.slice . draxt A new A new draxt collection which contains sliced items. source

filter draxtCollection.filter(callback [, thisArg]) callback ( function ) – A function to execute for each node.

( ) – A function to execute for each node. thisArg ( any ) – Value to use as this (i.e the reference Object) when executing callback. Filter the collection's nodes and return a new draxt collection. Uses Array.prototype.filter . draxt A new A new draxt collection which contains filtered items. source

forEach draxtCollection.forEach(callback [, thisArg]) callback ( function ) – A function to execute for each node.

( ) – A function to execute for each node. thisArg ( any ) – Value to use as this (i.e the reference Object) when executing callback. Iterate over the draxt collection and execute a function for each node. Uses Array.prototype.forEach . → draxt The current collection. source

each draxtCollection.each() Alias for draxt.forEach . source

map draxtCollection.map(callback [, thisArg]) callback ( function ) – A function to execute for each node.

( ) – A function to execute for each node. thisArg ( any ) – Value to use as this (i.e the reference Object) when executing callback. Create an array with the results of calling a provided function on every node in the draxt collection. Uses Array.prototype.map . → array source

mapAsync draxtCollection.mapAsync(fn [, thisArg]) fn ( function ) – A function to execute for each node.

( ) – A function to execute for each node. thisArg ( any ) – Value to use as this (i.e the reference Object) when executing callback. Asynchronous version of draxt.map . The results of mapped array is passed to Promise.all method. → promise source

some draxtCollection.some(fn) fn ( function ) – A function to execute for each node. Test whether at least one node in the collection passes the test implemented by the provided function. Uses Array.prototype.some . → boolean source

sort draxtCollection.sort(callback) callback ( function ) – A function that defines the sort order. Sort the nodes of collection in place and return the draxt collection. Uses Array.prototype.sort . → draxt Note that the collection is sorted in place, and no copy is made. source

reverse draxtCollection.reverse() Reverse the collection's nodes in place. The first array element becomes the last, and the last array element becomes the first. → draxt source

directories draxtCollection.directories() Filter directory nodes (instances of Directory class) and return a new draxt collection. → draxt source

files draxtCollection.files() Filter file nodes (instances of File class) and return a new draxt collection. → draxt source

empty draxtCollection.empty() Empty the draxt collection. This method doesn't affect file system! → draxt source

drop draxtCollection.drop(node) node ( draxt | node | array.<(node|string)> ) – Accepts various paramters. Remove node(s) from the current draxt collection by using .pathName s as the criterion. → draxt source

Interfaces

Draxt introduces several DOM-like interfaces representing fileysystem objects. There are several interfaces. File for files, Directory for directories and SymbolicLink for symbolic links. These interfaces extends the base Node interface.

Just like DOM interfaces, draxt interfaces has their own set of unique methods. As an example, a directory instance has .find() method but a file instance doesn't.

Node class is an interface that other classes representing file system's nodes (like File , Directory , SymbolicLink , ...) inherit.

const node = new Node(pathName [, stats]);

node.nodeName ( string ) Default: 'Node' . The name of constructor of the current node.

node.NODE_TYPE ( number ) Default: 0 . Code number for the node.

node.pathName ( string ) Absolute pathName of the node. Example: '/app/readme.md' .

node.baseName ( string ) baseName of the node. Example: 'readme.md' .

node.name ( string ) Name of the node without the possible extension. Example 'readme' .

node.extension ( string | undefined ) Extension of the node without . . Example: 'js' .

node.parentPath ( string ) pathName of the parent directory of the node.

node.rootPath ( string ) Root path of the file system.

node._stats ( object | undefined ) Cached instance of fs.Stats for the node.

node.fs ( object ) Refers to fs-extra package.

node.glob ( object ) Refers to glob package.

rawQuery Node.rawQuery(pattern [, options]) pattern ( string ) – Pattern for glob package.

( ) – Pattern for package. options ( object ) – Options for glob package. Asynchronously query the file system by using glob package. → promise.<array> An array of pathNames. source

rawQuerySync Node.rawQuerySync(pattern [, options]) pattern ( string ) – Pattern for glob package.

( ) – Pattern for package. options ( object ) – Options for glob package. Synchronously query the file system by using glob package. → array An array of pathNames. source

toNodes Node.toNodes(pathNames) pathNames ( array ) – Array of pathNames. Convert array of paths to array of node instances asynchronously! A node instance can be an instance of File , Directory or SymbolicLink . const pathNames = [ '/app/resources', '/app/resources/style.css' ]; Node.toNodes(pathNames).then(result => { // result: [ Directory { pathName: '/app/resources', ... }, File { pathName: '/app/resources/style.css', ... } ] }); → promise.<array> Array of node instances. source

toNodesSync Node.toNodesSync(pathNames) pathNames ( array ) – Array of paths Convert array of paths to array of nodes synchronously! A node instance can be instance of File , Directory or SymbolicLink . → array Array of node instances. source

query Node.query(pattern [, options]) pattern ( string ) – A glob pattern.

( ) – A pattern. options ( object ) – Options for glob package. Asynchronously query the file system by using glob package. → promise.<array> Array of nodes. source

querySync Node.querySync(pattern [, options]) pattern ( string )

( ) options ( object ) – Options for glob package. Synchronously query the file system by using glob package. → array Array of nodes. source

getPathName node.getPathName() Get the node's pathName. → string source

getBaseName node.getBaseName() Get the node's baseName. → string source

getExtension node.getExtension() Get the node's extension. → string source

getName node.getName() Get name of the node. For File nodes the name property is the name of file without possible extension. → string source

getParentPath node.getParentPath() Get the node's parent directory pathName. → string source

getCachedStats node.getCachedStats() Get cached fs.Stats instance for the node. Returns undefined when there is no cached stats for the node. This happens only when the node is created manually by user without passing a stats object. → object | undefined source

getStatProp node.getStatProp(propName) propName ( string ) Get a stat property's value from cached fs.Stats for the node. The method returns undefined when there is no cached stats. // Get `blksize` property of fs.Stats instance cached for the node. const node_ctime = node.getStatProp('blksize'); → any source

getAccessTime node.getAccessTime() Get "access time" of the node. Returns atime property of the cached stats. → date source

getModifiedTime node.getModifiedTime() Get "modified time" of the node. Returns mtime property of the cached stats. → date source

getBirthTime node.getBirthTime() Get "birthday time" of the node. Returns birthtime property of the cached stats. → date source

getChangeTime node.getChangeTime() Get "change time" of the node. Returns ctime property of the cached stats. → date source

getSize node.getSize() Get size of the node. Size is simply the size property of the cached fs.Stats instance. → number source

isDirectory node.isDirectory() Is the node a directory? → boolean source

isFile node.isFile() Is the node a file? → boolean source

isSymbolicLink node.isSymbolicLink() Is the node a symbolic link? → boolean source

isDotFile node.isDotFile() Is the node a dot file? i.e. does the node's name begin with dot character. → boolean source

renewStats node.renewStats() Asynchronously renew stats of the node. Uses fs.lstat . promise A fresh A fresh fs.Stats instance for the node. source

renewStatsSync node.renewStatsSync() Synchronously renew stats of the node. Uses fs.lstatSync . → node source

getOctalPermissions node.getOctalPermissions() Get octal representation of the node's permissions. node.getOctalPermissions() // → "755" → string source

getPermissions node.getPermissions() Get permissions of the node for owner, group and others by converting mode property of cached stats into an object. node.getPermissions() // → { read: { owner: true, group: true, others: false }, write: { owner: true, group: true, others: false }, execute: { owner: true, group: true, others: false } } → object source

access node.access([mode]) mode ( integer ) Default: fs.constants.F_OK Asynchronously tests a user's permissions for the file or directory. Wrapper for promisified fs.access . // Check if the node is readable. node.access(node.fs.constants.R_OK).then(() => { // node is readable }).catch(e => { // node is not readable }); → promise source

accessSync node.accessSync([mode]) mode ( integer ) Default: fs.constants.F_OK Wrapper for fs.accessSync . → node this source

chmod node.chmod(mode) mode ( integer ) Wrapper for promisified fs.chmod . → promise source

chmodSync node.chmodSync(mode) mode ( integer ) Wrapper for fs.chmodSync . → node this source

lchmod node.lchmod(mode) mode ( integer ) Wrapper for promisified fs.lchmod . → promise source

lchmodSync node.lchmodSync(mode) mode ( integer ) Wrapper for fs.lchmodSync . → node source

chown node.chown(uid, gid) uid ( integer ) – The user id

( ) – The user id gid ( integer ) – The group id Wrapper for promisified fs.chown . → promise source

chownSync node.chownSync(uid, gid) uid ( integer ) – The user id

( ) – The user id gid ( integer ) – The group id Wrapper for fs.chownSync . → node The file node source

lchown node.lchown(uid, gid) uid ( integer ) – The user id

( ) – The user id gid ( integer ) – The group id Wrapper for promisified fs.lchown . → promise source

lchownSync node.lchownSync(uid, gid) uid ( integer ) – The user id

( ) – The user id gid ( integer ) – The group id Wrapper for fs.lchownSync . → node The file node source

exists node.exists() Does node exist on file system? Uses fs.access instead of the deprecated fs.exists method. → promise.<boolean> source

existsSync node.existsSync() Does node exist on file system? Wrapper for fs.existsSync . → boolean source

stat node.stat() Wrapper for promisified fs.stat . promise Promise representing instance of Promise representing instance of fs.Stats for the node. source

statSync node.statSync() Wrapper for fs.statSync . object Instance of Instance of fs.Stats for the node. source

lstat node.lstat() Wrapper for promisified fs.lstat . promise Promise representing instance of Promise representing instance of fs.Stats for the node. source

lstatSync node.lstatSync() Wrapper for fs.lstatSync . object Instance of Instance of fs.Stats for the node. source

link node.link(newPath) newPath ( string | Buffer | URL ) Wrapper for promisified fs.link . → Promise source

rename node.rename(newPath) newPath ( string | Buffer | URL ) Asynchronously rename node to the pathname provided as newPath. In the case that newPath already exists, it will be overwritten. Wrapper for promisified fs.rename . → promise source

renameSync node.renameSync(newPath) newPath ( string | Buffer | URL ) Wrapper for fs.renameSync . → node source

utimes node.utimes(atime, mtime) atime ( number | string | Date )

( | | ) mtime ( number | string | Date ) Wrapper for promisified fs.utimes . → promise source

utimesSync node.utimesSync(atime, mtime) atime ( number | string | Date )

( | | ) mtime ( number | string | Date ) Wrapper for fs.utimesSync . → node source

copy node.copy(destPath, options) destPath ( string ) – Destination path.

( ) – Destination path. options ( object ) – Options for fs-extra.copy . Asynchronously copy the node. Directory instances can have contents. Like cp -r . When directory doesn't exist, it's created! Wrapper for fs-extra.copy . // creating a `File` instance. `File` class extends the `Node` class! const file = new File('/app/resources/style.css'); file.copy('/app/backup/backup_style.css').then(() => { // file has been copied successfully! }).catch(e => { // There was an error! }); → promise source

copySync node.copySync(destPath, options) destPath ( string ) – Destination path.

( ) – Destination path. options ( object ) – Options for fs-extra.copySync . Wrapper for fs-extra.copySync . → node source

moveTo node.moveTo(targetDir, options) targetDir ( object | string ) – Directory instance or absolute path of the target directory.

( | ) – instance or absolute path of the target directory. options ( object ) – Options for fs-extra.move . Move node to another location. baseName property of the node is joined with targetDir param for resolving the final path for the node. The method on success updates path-related properties of the node, but node's cached stats (if any) is not refreshed! For updating node's stats, user can call node.renewStats() or node.renewStatsSync() methods after moving the node. Uses fs-extra.move . const node = new File('/app/resources/style.css'); const dir = new Directory('/app/target_dir'); node.moveTo(dir || '/app/target_dir').then(() => { // node has been moved into '/app/target_dir' directory! node.getPathName(); // → '/app/target_dir/style.css' }); → promise source

moveToSync node.moveToSync(targetDir, options) targetDir ( object | string ) – Directory instance or absolute path of the target directory.

( | ) – instance or absolute path of the target directory. options ( object ) – Options for fs-extra.move . Synchronous version of node.moveTo . → node source

appendTo node.appendTo() Alias for node.moveTo . source

appendToSync node.appendToSync() Alias for node.moveToSync . → node source

siblings node.siblings([patten, options]) patten ( string ) Default: '*' – Optional glob pattern.

( ) Default: – Optional pattern. options ( object ) – Options for glob package. Asynchronously select siblings of the node. Uses glob package. promise.<draxt> Promise representing a Promise representing a draxt collection. source

siblingsSync node.siblingsSync([pattern, options]) pattern ( string ) Default: '*' – Optional glob pattern.

( ) Default: – Optional pattern. options ( object ) – Options for glob package. Synchronously select siblings of the node. Uses glob package. draxt A draxt collection. source

remove node.remove() Remove the node from file system! Directory nodes can have contents. Like rm -rf . Wrapper for fs-extra.remove . → promise source

removeSync node.removeSync() Wrapper for fs-extra.removeSync . → node source

parent node.parent() Asynchronously get parent directory node of the node. It's an async method as it gets an instance of fs.Stats for the parent node asynchronously! const file = new File('/app/resources/style.css'); file.parent().then(dir => { dir.isDirectory(); // → true dir.getPathName(); // → '/app/resources' }); promise.<node> Promise representing a Promise representing a Directory instance. source

parentSync node.parentSync() Synchronously get parent directory node of the node. node A Directory instance. source

File class which extends the Node class is an interface representing pathNames that their fs.Stats 's .isFile() method returns true .

const file = new File(pathName [, stats]);

file.nodeName ( string ) Name of the node: 'File' .

file.NODE_TYPE ( number ) Code number for the node: 2 .

file.pathName ( string ) Absolute pathName of the node. Example: '/app/readme.md' .

file.baseName ( string ) baseName of the node. Example: 'readme.md' .

file.name ( string ) Name of the node without the possible extension. Example 'readme' .

file.extension ( string | undefined ) Extension of the node without . . Example: 'js' .

file.parentPath ( string ) pathName of the parent directory of the node.

file.rootPath ( string ) Root path of the file system.

file._stats ( object | undefined ) Cached instance of fs.Stats for the node.

file.fs ( object ) Refers to fs-extra package.

file.glob ( object ) Refers to glob package.

ensure file.ensure() Ensure the file node exists on file system. Wrapper for fs-extra.ensureFile . → promise source

ensureSync file.ensureSync() Ensure the file node exists on file system synchronously. Wrapper for fs.ensureFileSync . → node source

append file.append() Asynchronously append data to a file, creating the file if it does not yet exist. data can be a string or a Buffer. Wrapper for fs.appendFile . → promise source

appendSync file.appendSync() Wrapper for fs.appendFileSync . → node source

read file.read() Promisified wrapper for fs.readFile . → promise Promise object representing contents of the file. source

readSync file.readSync() Wrapper for fs.readFileSync . → any source

truncate file.truncate() Promisified wrapper for fs.truncate → promise source

truncateSync file.truncateSync() Wrapper for fs.truncateSync . → node source

write file.write() Promisified fs.writeFile → promise source

writeSync file.writeSync() Wrapper for fs.writeFileSync . → node source

Inherited Static Methods

Inherited Methods

Directory class which extends the Node class is an interface representing pathNames that their fs.Stats 's .isDirectory() method returns true .

const directory = new Directory(pathName [, stats]);

directory.nodeName ( string ) Name of the node: 'Directory' .

directory.NODE_TYPE ( number ) Code number for the node: 1 .

directory.pathName ( string ) Absolute pathName of the node. Example: '/app/readme.md' .

directory.baseName ( string ) baseName of the node. Example: 'readme.md' .

directory.name ( string ) Name of the node without the possible extension. Example 'readme' .

directory.extension ( string | undefined ) Extension of the node without . . Example: 'js' .

directory.parentPath ( string ) pathName of the parent directory of the node.

directory.rootPath ( string ) Root path of the file system.

directory._stats ( object | undefined ) Cached instance of fs.Stats for the node.

directory.fs ( object ) Refers to fs-extra package.

directory.glob ( object ) Refers to glob package.

append directory.append(nodes [, options]) nodes ( draxt | node | string | array.<(node|string)> ) – Accepts various parameters: draxt collection. a node instance. pathNames of a file or directory. array of node instances. array of absolute pathNames of files/directories. a mixed array of nodePaths and absolute pathNames of files/directories.

( | | | ) – Accepts various parameters: options ( object ) – Options for fs-extra.move . Append/move passed directories into this directory node. Uses node.moveTo which uses fs-extra.move . → promise.<nodes> Promise representing array of moved nodes. source

appendSync directory.appendSync(nodes [, options]) nodes ( draxt | array.<(node|string)> | string )

( | | ) options ( object ) – Options for fs-extra.move . Synchronous version of directory.append . → node The directory node. source

children directory.children([pattern, options]) pattern ( string ) Default: '*' – Glob pattern relative to the directory. The pattern is used against baseName of directory child nodes.

( ) Default: – Glob pattern relative to the directory. The pattern is used against of directory child nodes. options ( object ) – Options for glob package. Asynchronously select children of the directory by using glob package and return a draxt collection. → promise.<draxt> source

childrenSync directory.childrenSync([selector, options]) selector ( string ) – Optional selector

( ) – Optional selector options ( object ) – Options for glob package Synchronous version of directory.children . → draxt source

empty directory.empty() Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. Wrapper for fs-extra.emptyDir . → promise source

emptySync directory.emptySync() Synchronous version of directory.empty method. Wrapper for fs-extra.emptyDirSync . → node source

ensure directory.ensure() Asynchronously ensure directory exists. Wrapper for fs-extra.ensureDir . → promise source

ensureSync directory.ensureSync() Synchronously ensure directory exists. Wrapper for fs-extra.ensureDirSync . → node source

isEmpty directory.isEmpty() Is directory empty? → promise.<boolean> source

isEmptySync directory.isEmptySync() Synchronous version of directory.isEmpty method. → boolean source

find directory.find(pattern, options) pattern ( string ) – Glob pattern.

( ) – Glob pattern. options ( object ) – Options for glob package. Find matching decendants of the directory node. Uses glob package. → Promise.<draxt> source

findSync directory.findSync(selector, options) selector ( string )

( ) options ( object ) – Options for glob package. Synchronous version of directory.find method. → draxt source

readdir directory.readdir(options) options ( string | object ) Wrapper for promisified fs.readdir . → promise source

readdirSync directory.readdirSync(options) options ( string | object ) Wrapper for fs.readdirSync . → array source

read directory.read(options) options ( string | object ) Alias for directory.readdir method. → promise source

readSync directory.readSync(options) options ( string | object ) Alias for directory.readdirSync method. → array source

rmdir directory.rmdir() Wrapper for promisified fs.rmdir . Deletes the directory, which must be empty. → promise source

rmdirSync directory.rmdirSync() Wrapper for fs.rmdirSync . Deletes the directory, which must be empty. → node source

Inherited Static Methods

Inherited Methods

SymbolicLink class which extends the Node class is an interface representing pathNames that their fs.Stats 's .isSymbolicLink() method returns true .

const symbolicLink = new SymbolicLink(pathName [, stats]);

symbolicLink.nodeName ( string ) Name of the node: 'SymbolicLink' .

symbolicLink.NODE_TYPE ( number ) Code number for the node: 3 .

symbolicLink.pathName ( string ) Absolute pathName of the node. Example: '/app/readme.md' .

symbolicLink.baseName ( string ) baseName of the node. Example: 'readme.md' .

symbolicLink.name ( string ) Name of the node without the possible extension. Example 'readme' .

symbolicLink.extension ( string | undefined ) Extension of the node without . . Example: 'js' .

symbolicLink.parentPath ( string ) pathName of the parent directory of the node.

symbolicLink.rootPath ( string ) Root path of the file system.

symbolicLink._stats ( object | undefined ) Cached instance of fs.Stats for the node.

symbolicLink.fs ( object ) Refers to fs-extra package.

symbolicLink.glob ( object ) Refers to glob package.

isBroken symbolicLink.isBroken() Is the symlink broken? → promise.<boolean> source

isBrokenSync symbolicLink.isBrokenSync() Synchronous version of symbolicLink.isBroken method. → boolean source

readlink symbolicLink.readlink(options) options ( string | object ) – Options for fs.readlinkSync . Asynchronously read the value of the symbolic link. Wrapper for fs.readlink . → promise.<(string|buffer)> source

Inherited Static Methods

Inherited Methods