A better question is why Unix does not have a copy function to copy files. The operating system can do a better job copying files than user code. It can be much more efficient with network file systems, knows more about file attributes, better optimize IO, and could implement copy-on-write behavior. A copy() that only worked within a filesystem would be similar to rename().
In reply to Re: Why isn't there a "copy" function?
by iburrell
in thread Why isn't there a "copy" function?
by johnnywang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |