$ cnpm install root-link-target
Gets the shortest directory to which a file can be linked
<npm|yarn|pnpm> add root-link-target
const rootLinkTarget = require('root-link-target')
rootLinkTarget.sync('C:\\sub\\dir\\foo.txt')
//> C:\\
rootLinkTarget.sync(filename): stringReturns the shortest directory to which filename can be linked
rootLinkTarget(filename): Promise<string>Copyright 2013 - present © cnpmjs.org | Home |