ncp
ncp copied to clipboard
Asynchronous recursive file copying with Node.js.
Vars: An object with variables that are injected into the template files and file names.
Before copying a file, ncp first checks whether the target file exists. If it exists (writable is false), ncp will delete it and start copying. https://github.com/AvianFlu/ncp/blob/6820b0fbe3f7400fdb283c741ef88b6d8e2d4994/lib/ncp.js#L89-L97 But the deleted file...
The test case below can trigger a race condition and cause the copied file corrupted: ```js const eventEmitter = new EventEmitter(); let finishCount = 0; const hash1 = crypto.createHash('sha1'); const...
The bug is caused by following code: https://github.com/AvianFlu/ncp/blob/6820b0fbe3f7400fdb283c741ef88b6d8e2d4994/lib/ncp.js#L89-L109 As we can see, in line 108, `cb()` can be called before `rmFile()` and `copyFile()` finish their jobs. So if `target` file...
The bug is similar to #141 but applies to files. Before copying a file, ncp first checks whether the target file exists. If it exists (`writable` is `false`), ncp will...
This may be a same bug as #125. The test case: ```js const tmpDir = path.join(os.tmpdir(), 'testFolder'); fs.rmSync(tmpDir, {recursive: true, force: true}); // operation A ncp('./bin', tmpDir, function (err) {...
**Issue**: We detected vulnerable dependencies in your project by using the command “npm audit”: #### npm audit report diff
This would fix #121 were it to be merged.
when trying to copy a none exist folder (or any other error) allow an option to just stop without any error ``` ncp non-existing destination --silent ``` in other words...
I want to copy image files from `F:\` to `C:\IMAGE_STORAGE_PATH\`. In my mac, it works fine as long as the path is linux bases. However, I got the following result...