[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:23:56 PST 2015


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

--- Comment #11 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
@Vladimir Well, clearly you and I have very different expectations when copying
files. What I expect and what is pretty much exactly what cp does. e.g. with
cp, I always use directory for the target and never provide a file name unless
I'm renaming the file. And I screw it up every time that I use std.file.copy.
I've just never gotten around to fixing it like I should have. So, if we're not
going to fix std.file.copy to work like cp, and I want a usable copy function,
I'm clearly going to have to find the time to write one myself and use that,
and then I'll avoid std.file.copy like the plague.

> 6. Do you know any programming languages whose copy function from their standard library behaves like cp in this regard?

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.

--


More information about the Digitalmars-d-bugs mailing list