downloads
Across all versions.
Download trend unavailable.
compatibility
Runtime metadata.
keywords
Tagged topics.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
297.7 kB
Includes dependencies.
Expand nested symbolic links to real paths.
fs.readlink only handles paths to symbolic links and not paths that contain symbolic links. This module solves this use case. Similar to readlink(1) with -f flag.
Assuming /tmp/foo is a symbolic link pointing to the folder /tmp/bar/baz which in turn contains file. Then readlink expands /tmp/foo/file to the real path, e.g. /tmp/bar/baz/file.
const readlink = require('readlink')
readlink('/tmp/foo/file', (err, path) => {
console.log(path) // /tmp/bar/baz/file
})
readlink(path, cb)Where path is a string and cb is a node style callback with err and result.
readlink.sync(path)Sync version.
MIT