can-link
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

can-link

Returns true if a link can be created

npm version Build Status

Installation

npm i -S 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

Readme

Keywords

Package Sidebar

Install

npm i can-link

Weekly Downloads

1,326

Version

1.0.2

License

MIT

Unpacked Size

4.03 kB

Total Files

5

Last publish

Collaborators

  • zkochan