Skip to content
copy symlink, because fs.copyFile can't
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.eslintrc
.eslintrc.test
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
package.json

README.md

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

You can’t perform that action at this time.