Skip to content
This repository

move / moveFile API #10

Open
andrewrk opened this Issue October 04, 2012 · 5 comments

2 participants

Andrew Kelley JP Richardson
Andrew Kelley

this module should also have move / moveFile API

JP Richardson
Owner

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

Andrew Kelley

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?

JP Richardson
Owner

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

Andrew Kelley

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

JP Richardson
Owner

Fair enough. Thanks for the heads up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.