resolve-link-target

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

Usage no npm install needed!

<script type="module">
  import resolveLinkTarget from 'https://cdn.skypack.dev/resolve-link-target';
</script>

README

this package has been moved to https://github.com/zkochan/packages/tree/master/resolve-link-target

resolve-link-target

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

npm version Build Status Build Status on Windows

Installation

npm install 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