Recursive copy #1

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

worr commented Apr 19, 2011

I changed File::Copy to use the newish IO.copy method, as well as implemented recursive copying.

Owner

tadzik commented Apr 19, 2011

I'd rather not suddenly remove the original cp. Maybe it's good to leave a warn() in the body of the old sub?

Also, having IO.copy maybe the better place to implement recursive copying is to augment the IO class, and deprecate File::Copy completely? cp would still be needed for some Shell::Command (which I hope will happen sooner than later).

Anyway, I'm for merging it if we keep the original cp, of course having it use IO.copy

worr commented Apr 19, 2011

Yeah, that's why I added a recursive flag, to preserve compatibility. Though
I stupidly made that a required argument when I was testing it. Whoops.

I would love to have that functionality in IO.copy, honestly. That does seem
ideal, though since they weren't written in the first place, and they're
rather trivial to write, I thought that there was some rational for keeping
them out of the language.

I can scoop them in and submit a pull request to rakudo though.

On Tue, Apr 19, 2011 at 2:50 AM, tadzik <
reply@reply.github.com>wrote:

I'd rather not suddenly remove the original cp. Maybe it's good to leave a
warn() in the body of the old sub?

Also, having IO.copy maybe the better place to implement recursive copying
is to augment the IO class, and deprecate File::Copy completely? cp would
still be needed for some Shell::Command (which I hope will happen sooner
than later).

Anyway, I'm for merging it if we keep the original cp, of course having it
use IO.copy

Reply to this email directly or view it on GitHub:
#1 (comment)

-Will Orr

Preserved old behavior
- fixed testing cleanup
Owner

tadzik commented Feb 24, 2013

Things have changed a bit since this pull request was opened, but I integrated the code into Shell::Command without changing a line of code, and it works like a charm now. Thanks!

@tadzik tadzik closed this Feb 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment