How to determine if a file will be logically moved or physically moved.
- by Frederic Morin
The facts:
When a file is moved, there's two possibilities:
The source and destination file are on the same partition and only the file system index is updated
The source and destination are on two different file system and the file need to be moved byte per byte. (aka copy on move)
The question:
How can I determine if a file will be either logically or physically moved ?
I'm transferring large files (700+ megs) and would adopt a different behaviors for each situation.
Edit:
I've already coded a moving file dialog with a worker thread that perform the blocking io call to copy the file a meg at a time. It provide information to the user like rough estimate of the remaining time and transfer rate.
The problem is: how do I know if the file can be moved logically before trying to move it physically ?