Copy Symlink
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 = ;const src = './symlink';const dst = './symlink-copy'; ;
Or using async-await
const copySymlink = ; async { await ;};
Related
- fs-copy-file - Copies src to dest.
- fs-copy-file-sync - Synchronously copies src to dest.
License
MIT