Get the filename of a symlink's target
$ npm install get-link-target
Get the filename of a symlink's target
npm install --save get-link-target
const getLinkTarget = require('get-link-target')
getLinkTarget('path-to-symlink')
.then(targetPath => console.log(targetPath))
//> "/home/target"
.catch(err => console.error(err))
// or synchronously
getLinkTarget.sync('path-to-symlink')
//> "/home/target"
MIT © Zoltan Kochan
© 2010 - cnpmjs.org x YWFE | Home | YWFE