in reply to File::Copy and file manipulation performance

File::Copy::move() is just File::Copy::copy() with an unlink() if it succeeded.
  • Comment on Re: File::Copy and file manipulation performance

Replies are listed 'Best First'.
Re^2: File::Copy and file manipulation performance
by tirwhan (Abbot) on Dec 06, 2005 at 23:11 UTC

    I think not, move() first tries a rename, which is an atomic operation (if both files are on the same filesystem, not on NFS etc.) at least on POSIX systems. I was under the impression this was the same on Windows systems? Only if the rename does not succeed does File::Copy::move() attempt a copy and unlink.


    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan