[Issue 3862] std.file.copy does not have the same behavior as cp

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Nov 21 19:48:34 PST 2015


https://issues.dlang.org/show_bug.cgi?id=3862

--- Comment #13 from Vladimir Panteleev <thecybershadow at gmail.com> ---
(In reply to Vladimir Panteleev from comment #12)
> In that case, I'll have to keep in mind to avoid any code you write like a
> plague ;)

OK, sorry, that was over the top.

(In reply to Jonathan M Davis from comment #11)
> D is the only language that I use with any regularity that even declares a
> copy function. So, my primary experience with copying files is cp, and cp's
> behavior is what I expect. I find std.file.copy's behavior to be very
> unfriendly in comparison.

I just looked at Python, and it provides both variants. We could introduce
"copyTo" which works in the same way, and perhaps also require that the path
ends with a directory separator for the "copy inside directory" behavior to
activate.

--


More information about the Digitalmars-d-bugs mailing list