包详细信息

root-link-target

zkochan83.4kMIT3.0.0

Gets the shortest directory to which a file can be linked

link, hardlink, fs

自述文件

root-link-target

Gets the shortest directory to which a file can be linked

!--@shields('npm')--

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

更新日志

root-link-target

3.0.0

Major Changes

  • ce3290e: Drop Node.js 8 support and use async/await syntax.