szwacz / fs-jetpack

Better file system API for Node.js
MIT License
777 stars 41 forks source link

Improve readme on `move` and `rename` #92

Closed papb closed 4 years ago

papb commented 4 years ago

Added information on how move and rename behaves when the destination path already exists.

Obtained this information by testing manually in Windows. Is there any chance this behaves differently in other OSes?

szwacz commented 4 years ago

Thanks for this! I've actually never considered this case. I want for fs-jetapck to be "safe by default", that means not to accidentally overwrite/delete data user didn't want to loose. As I see this is the case here (overwtite is default behaviour). So it would be better to change the behaviour of the library. But technically speaking this is a breaking change, so semver bump would be required. Let me play with it a bit.

szwacz commented 4 years ago

I've just released version 3.0 which changes the behaviour you described to more safe. Thank you for figuring this out!