Originally Posted by
laserlight
Why not? It is part of the standard library and so should be available on Windows and Linux.
Thank you for your response Laserlight. The reason rename() won't work is because in Linux, usually the /tmp directory is a different filesystem that's mounted at boot. OpenSUSE does it this way, as does some other distros. rename() won't work across different file systems. It fails with:
Code:
EXDEV
The two file names newname and oldname are on different file systems.
Seeing how I create the temp file in the /tmp directory, using rename() fails. I believe link() would have the same issue with the filesystem problem.