can-link
Returns true if a link can be created
Last updated 8 years ago by zkochan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install can-link 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.2                                ...           latest (8 years ago)
  • 2.0.0                                ...           next (5 years ago)

5 Versions

  • 2.0.0                                ...           5 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
  • 0.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (5)

Copyright 2013 - present © cnpmjs.org | Home |