Moves an existing file or directory, including its children, with various move options.
BOOLEAN MoveRtFile( LPSTR lpExistingFileName, LPSTR lpNewFileName, DWORD dwFlags
);
lpExistingFileName
lpNewFileName
MOVEFILE_REPLACE_EXISTING | Allows replacement of an existing file |
MOVEFILE_COPY_ALLOWED | Copies file(s) if move is to new volume |
MOVEFILE_CREATE_HARDLINK | (future use) |
MOVEFILE_WRITE_THROUGH | Returns after flush to disk (no-op for DRTOS/FAT32) |
Also used to rename a file.
TRUE on success. FALSE on failure. Possible failures include the following (returned from GetLastRtError()):
Status value | Meaning |
---|---|
E_FNEXIST | Existing file did not exist |
E_FEXIST | New file already exists and MOVEFILE_REPLACE_EXISTING was not specified |
E_NOT_SAME_DEVICE | New file path on a different volume and MOVEFILE_COPY_ALLOWED was not specified |
E_FACCESS | Either file was not accessible |
E_FTYPE | A file component is not a directory file |
E_ILLOGICAL_RENAME | The call attempted to rename a directory to a path containing itself |
E_PATHNAME_SYNTAX | One or other of the pathnames contains an invalid character |
E_SPACE | The volume is full |
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 6.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |