root-link-target
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

root-link-target

Gets the shortest directory to which a file can be linked

npm version

Installation

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

Usage

const rootLinkTarget = require('root-link-target')

rootLinkTarget.sync('C:\\sub\\dir\\foo.txt')
//> C:\\

API

rootLinkTarget.sync(filename): string

Returns the shortest directory to which filename can be linked

rootLinkTarget(filename): Promise<string>

License

MIT © Zoltan Kochan

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.1.01,309next
3.0.03latest

Version History

VersionDownloads (Last 7 Days)Published
3.1.01,309
3.0.03
2.0.01
1.0.11
1.0.01

Package Sidebar

Install

npm i root-link-target

Weekly Downloads

1,315

Version

3.0.0

License

MIT

Unpacked Size

4.09 kB

Total Files

6

Last publish

Collaborators

  • zkochan