1.1.0 • Published 7 years ago

get-link-target v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

get-link-target

Get the filename of a symlink's target

npm version Build Status

Installation

npm install --save get-link-target

Usage

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"

License

MIT © Zoltan Kochan