-
Notifications
You must be signed in to change notification settings - Fork 188
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
Standard lib FileUtils.mv takes a string or an array of strings as the src arg #40
Comments
A further problem is that fakefs' FileUtils.mv seems to expect dest to be an inclusive path rather than either a renamed inclusive path or a directory to move the existing file to. The following method fixes both issues:
|
I'd gladly accept a patch if some tests were included :) |
I've addressed these two issues (the array of files identified in the main issue #40, as well as directory destinations as mentioned in the comment above) as separate commits in http://github.com/gcampbell/fakefs/tree/40-mv-to-dir. The final result ends up looking pretty much like zenspider's code, except with a ternary instead of the if/else. |
Could please merge gcambell's commits into master? They work just fine with the latest master https://github.com/wijet/fakefs/tree/40-mv-to-dir |
This addresses the first comment on fakefs#40.
is perfectly legal. fakefs currently breaks in:
as it isn't valid to pass an array as the arg to FileSystem.find. The error message is:
The text was updated successfully, but these errors were encountered: