Boost logo

Boost :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2005-01-27 14:39:34


At Tuesday 2005-01-25 14:28, you wrote:

>What is the rationale for having copy_file fail if the target file
>exists?
>
>This is not how any cp/copy in any shell I know of works, actually
>quite surprising.

in windows (and every OS I've been on the writing team) the shell will at
least _ask_ for permission to overwrite.

>And with boost.filesystem there is no way to avoid this, short of
>rewriting the function to allow it. The other way around would have
>been easy: fs::exists(target) || fs::copy_file(source, target)
>
>(One option is to delete the target before doing the copy, but then it
>is impossible to keep the same inode as before, and f.x. for backup
>files this is something that you want.)
>
>--
> Lgb
>
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk