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

Readme

Keywords

Package Sidebar

Install

npm i root-link-target

Weekly Downloads

912

Version

3.0.0

License

MIT

Unpacked Size

4.09 kB

Total Files

6

Last publish

Collaborators

  • zkochan