elixir-lang/elixir — pull request #2722 by aforward (2014-08-27 04:33:39+00:00)
Title: Added first draft of File.mv for moving files around

--- first pull request, apologies for any naive mistakes ---

I am working on file sync application and noticed that File.mv (or rename) was not available. Maybe it is (regardless it was good to dive into the edges of Elixir; still trying to wrap my head around quote / unquote :-))

The implementation delegates mostly to erlang's rename function; but I wanted to be able to

mv /some/random/file.txt /some/other/dir

And if /some/other/dir was a dir then the resulting mv would be synonymous to

mv /some/random/file.txt /some/other/dir/file.txt

There's a comment in the "cp" that leads me to believe this will probably be rejected in favour of being explicit; but I thought I would try.

"make test" passees, let me know what it will take to push this in and what I am doing incorrectly.