Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the COPYFILE_FICLONE constant #27

Closed
sindresorhus opened this issue Feb 12, 2019 · 5 comments
Closed

Use the COPYFILE_FICLONE constant #27

sindresorhus opened this issue Feb 12, 2019 · 5 comments

Comments

@sindresorhus
Copy link
Owner

For faster copy.

https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback

@wmertens
Copy link

wmertens commented Mar 7, 2019

Just wondering how this would be implemented:

  • check if COPYFILE_FICLONE flag exists
  • if so, call fs.copyFile and emit progress 0, then progress 100% on completion

For the sync version, just add the flag if it exists

Right?

@sindresorhus
Copy link
Owner Author

Let's wait a little bit with this. It has some issues: nodejs/node#27273

@wmertens
Copy link

wmertens commented Apr 19, 2019

Since the problem will always exist with the current Node versions, how about working around it keyed by version and platform?

@sindresorhus
Copy link
Owner Author

Since the problem will always exist with the current Node versions

Current patch versions, you're right, but the Node.js team backports fixes all the time, so might be fixed in a patch/minor Node.js 8 version. I prefer to hold on for a bit and see if they'll do.

@sindresorhus
Copy link
Owner Author

If anyone wants to work on this, see the initial attempt and feedback in #40.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants