npm.io
3.0.0 • Published 4 months ago

resolve-link-target

Licence
MIT
Version
3.0.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
104

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

Keywords