Thanks to everyone for the answers.

Frederik

On Tue, Aug 22, 2006 at 12:29:24PM -0700, Paul Eggert wrote:
> 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.
> 

-- 
http://ofb.net/~frederik/


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to