Thanks,
Mark
On Apr 28, 2004, at 10:12 AM, Wiggins d Anconia wrote:
On Apr 28, 2004, at 11:48 AM, Mark Wheeler wrote:
Hi Ken,
I switched that because it was suggested that writing files over system boundaries might be a problem. What is the difference between the two? It sounds like, from your comment, that they do very different things.
Yeah - rename() moves the file, and copy() makes a copy of it.
If we are going to get technical we might as well go further, rename()
changes link information in the inode which is why it doesn't work
across filesystem boundaries, copy() copies a file, then there is move()
which moves a file, doing a rename if possible, failing that then it
does a copy and unlink, etc.
Which is why I suggested File::Copy it provides copy() and move(), assuming the docs got read then Mark could decide between his subject line "Copying files" and his code "rename" ...
http://danconia.org