$ npm install resolve-link-target
Resolve a symlink's (or junction's) target
<npm|yarn|pnpm> add resolve-link-target
const resolveLinkTarget = require('resolve-link-target')
resolveLinkTarget('path-to-symlink').then(targetPath => console.log(targetPath))
//> "/home/target"
resolveLinkTarget.sync('path-to-symlink')
//> "/home/target"
resolveLinkTarget(linkPath)
Returns a Promise
.
resolveLinkTarget.sync(linkPath)
Type: string
Path to the symlink or junction that should be resolved.
© 2010 - cnpmjs.org x YWFE | Home | YWFE