1.0.1 • Published 3 years ago

resolve-link-target v1.0.1

Weekly downloads
1,567
License
MIT
Repository
github
Last release
3 years ago

resolve-link-target

Resolve a symlink's (or junction's) target

npm version

Installation

<npm|yarn|pnpm> add resolve-link-target

Usage

const resolveLinkTarget = require('resolve-link-target')

resolveLinkTarget('path-to-symlink').then(targetPath => console.log(targetPath))
//> "/home/target"

resolveLinkTarget.sync('path-to-symlink')
//> "/home/target"

API

resolveLinkTarget(linkPath)

Returns a Promise.

resolveLinkTarget.sync(linkPath)

linkPath

Type: string

Path to the symlink or junction that should be resolved.

License

MIT © Zoltan Kochan