Answer» Does anyone know if it is possible to MOVE a file WITHIN a VOLUME without having to move the physical file especially if it is very large.
In windows there are a set of API calls is there something similar? If anyone knows a similar command to MOVEFILEWRITETHRU?
Thanks
Robmv and rename both do this, just like the windows/DOS "move" command. the win32 API MoveFile() and MoveFileEx() both change the directory location of a file but do not move the clusters of the file if the source and destination are on the same volume, just like if you use any of the standard library stdlib functions such as rename().
The MOVEFILE_WRITE_THROUGH flag for the Win32 MoveFileEx() only affects file moves between volumes which are handled as a copy followed by a delete, and MAKE sure that I/O is flushed to disk before the operation returns.
the STDIO C Function rename() can move files to new directories on the same volume.
|