copy-symlink
copy symlink, because fs.copyFile can't
Last updated 6 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install copy-symlink 
SYNC missed versions from official npm registry.

Copy Symlink License NPM version Dependency Status Build Status Coverage Status

Copy symlink because fs.copyFile can't.

When you use fs.copyFile it gets realpath and then copies content of a source file from realpath.

copy-symlink also gets realpath but then creates symbolic link on a new location.

Install

npm i copy-symlink

API

copySymlink(src, dest)

It is a promise so you can use it this way:

const copySymlink = require('copy-symlink');
const src = './symlink';
const dst = './symlink-copy';

copySymlink()
    .then(console.log)
    .catch(console.error);

Or using async-await

const copySymlink = require('copy-symlink');

async () => {
   await copySymlink();
}();

Related

License

MIT

Current Tags

  • 2.0.0                                ...           latest (6 years ago)

2 Versions

  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 4
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 2
Dependencies (0)
None
Dev Dependencies (11)
Dependents (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE