-
Notifications
You must be signed in to change notification settings - Fork 775
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
moveSync support #309
Comments
I wouldn't be opposed, @jprichardson ? |
Would definitely love this! Are you up for a PR @PeterDaveHello? |
I'm afraid I'm not sure if I have enough time to implement this, though I know it's not that huge, but I'm not familiar with fs-extra codes, so anyone want to do it please feel free to do, thanks 😄 |
Hey guys, I've been using the Isn't true that the Regarding the I've tried with this, const cpSync = require('../copy-sync').copySync
const rmSync = require('../remove').removeSync
function mvSync (source, dest, options) {
cpSync(source, dest, options)
rmSync(source)
} and I tested for various cases for both file and directory and got the expected results. |
@mawni thanks for your help, maybe you can consider to directly send your pull request? |
@mawni btw, IMO, the |
@PeterDaveHello thanks for a great note. Please let me see what I can do and I'll send a pull request then. |
In the What are the main concerns here? |
At a quick glance, I'm thinking the functions just seemed really long and could be broken down. Probably not a huge priority, but if you feel like cleaning it up, go for it! |
Sure thing. The main reason that I asked that was since I am working on So if the overall algorithm is fine, then I can cleanup Thoughts? |
https://github.com/jprichardson/node-fs-extra/blob/master/lib/move/index.js#L21 but currently there is nothing about it in https://github.com/jprichardson/node-fs-extra/blob/master/docs/move.md Do we want to keep the option or it needs to be removed form the source code to be consistent with its docs? |
@manidlou There are a couple of similar options thought
Since they aren't documented, they are not subject to semver. Therefore, we can remove or change them at any time. If/When we document them, we will need to ensure they follow semver (which requires good tests). Each undocumented option is a case-by-case basis, ask @jprichardson about this one. Personally, I would vote for removal, but others may differ. |
Vote for removal of what? |
The undocumented |
Agreed, I don't know why a person wouldn't want it. |
Would you like to have
moveSync
just likecopy
andcopySync
? Thanks 😄The text was updated successfully, but these errors were encountered: