$ cnpm install can-link
Returns true if a link can be created
npm i -S can-link
const canLink = require('can-link')
canLink.sync('C:\\foo.txt', 'D:\\foo.txt')
//> false
canLink.sync('C:\\foo.txt', 'C:\\dir\\foo.txt')
//> true
canLink.sync(existingPath, newPath): BooleanReturns true if fs.linkSync(existingPath, newPath) is able to create a link.
canLink(existingPath, newPath): Promise<Boolean>Returns true if fs.link(existingPath, newPath) is able to create a link.
Copyright 2013 - present © cnpmjs.org | Home |