Re: rename_file vs move_file
If you think of it in terms of renaming/moving a file, then whether "rename" or "move" makes more sense depends on whether the file will be in a different directory.
If you think of it in terms of changing a file path, than "rename" makes more sense than "move".
Re: rename_file vs move_file
Another difference could be if overwriting another file with the same path as the destination is allowed. I don't know how this works on other platforms, but on Windows you cannot overwrite when using rename, but you can overwrite with move.
Re: rename_file vs move_file
Another implementation difference is that rename usually can't change the device a file is on, but move can.
Re: rename_file vs move_file
Hum...
Move it is then!
Thanks
Re: rename_file vs move_file
Instead of writing your own code, wouldn't the boost::filesystem do the trick?
Re: rename_file vs move_file
I wish, but this current project has the following restraints:
1) No templates due to compiler limitations.
2) No non in-house code.
EDIT: 3) No exceptions.
:(
It's basically "C with classes here".
That said, I'm not completly re-writing the wheel, my interface is mostly a convenience wrapper to a lower level API.