question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass copied file list on success

See original GitHub issue

It would be extremely useful if the list of files copy()d were passed to the callback/then. Even more so when a filter is used.

fs.copy('/tmp/myfile', '/tmp/mynewfile')
.then(files => {
  console.log('success!', files.join(', '))
})

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jprichardsoncommented, Jul 19, 2018

As a short-term solution, why not just log in filter()? I’m not convinced adding options for this is a good idea. Long-term, I think we need to move to streams or AsyncIterators on these operations.

0reactions
RyanZimcommented, Aug 11, 2018

Closing as future for the time being.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Progress during large file copy (Copy-Item & Write-Progress?)
It seems like a much better solution to just use BitsTransfer, it seems to come OOTB on most Windows machines with PowerShell 2.0...
Read more >
Copy files in Linux, avoid the copy if files do exist in destination
I wonder how could I tell the command "cp", once it tries to copy again, not to copy files again if they exist...
Read more >
CopyFiles@2 - Copy files v2 task - Microsoft Learn
Use this task to copy files from a source folder to a target folder using match patterns. (The match patterns will only match...
Read more >
Copy-Item : Copy Files like a Boss in PowerShell
Discover how copy-item cmdlet allows copy of a file while giving the ability to recurse files and use wildcards to select the files....
Read more >
Hitchhiker's Guide to Robocopy - PDQ
Congratulations, you have successfully passed the Hackers 101 Course! ... /LEV:n, only copy the top n LEVels of the source directory tree.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found