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

move / moveFile API #10

Closed
andrewrk opened this issue Oct 4, 2012 · 6 comments
Closed

move / moveFile API #10

andrewrk opened this issue Oct 4, 2012 · 6 comments

Comments

@andrewrk
Copy link

andrewrk commented Oct 4, 2012

this module should also have move / moveFile API

@jprichardson
Copy link
Owner

This won't be hard to do, I can put this in the next release.

@andrewrk
Copy link
Author

andrewrk commented Oct 5, 2012

Sweet!

Ideally it would try fs.rename first, because that's blazingly fast, but that doesn't work if you're trying to move a file across filesystem boundaries. So you would have to catch that error and then do the input stream / output stream piping technique.

Can I make you a pull request?

@jprichardson
Copy link
Owner

Ya, sure, that would be helpful. Just don't bump the version number.

@andrewrk
Copy link
Author

Just a heads up, I decided not to make a pull request to node-fs-extra because I decided that I'm going to simply require rimraf, ncp, mkdirp, etc directly when I need them.

Here's an implementation of moveFile though if you want it: https://github.com/superjoe30/node-mv

@jprichardson
Copy link
Owner

Fair enough. Thanks for the heads up.

@jprichardson
Copy link
Owner

Done in 0.9.0. https://github.com/jprichardson/node-fs-extra/releases/tag/0.9.0 Copied the code over. Would have just included the module, but I didn't want to have two different versions for each ncp, rimraf, and mkdirp.

Thanks for your work on this.

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

No branches or pull requests

2 participants