1.0.2 • Published 3 years ago

can-link v1.0.2

Weekly downloads
1,640
License
MIT
Repository
github
Last release
3 years ago

can-link

Returns true if a link can be created

npm version

Installation

<npm|yarn|pnpm> add can-link

Usage

const canLink = require('can-link')

canLink.sync('C:\\foo.txt', 'D:\\foo.txt')
//> false

canLink.sync('C:\\foo.txt', 'C:\\dir\\foo.txt')
//> true

API

canLink.sync(existingPath, newPath): Boolean

Returns 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.

License

MIT © Zoltan Kochan

2.0.0

3 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.0

6 years ago