Frederik Eaton <[EMAIL PROTECTED]> writes:

> is there a reason why users wouldn't always want a "copyFile"
> function to remove the destination first?

Lots and lots and lots of reasons.  For example, the destination file
might be read-only, and the user might want the copy to fail in that
case.  A copyFile that first removed the destination would mistakenly
succeed on a read-only destination.

Another example: "cp infile /dev/null".  Replacing /dev/null with a
regular file is a bad idea, in my experience.  (And I have experience. :-)

This may help to explain why Unix does not have a standard copy_file
function.  Copying a file is harder than it looks, and there are lots
of options.  Good luck with your attempt to simplify things for Haskell.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to