INtime SDK Help
MoveRtFile
INtime SDK v6 > About INtime > INtime Kernel > Files > MoveRtFile

Moves an existing file or directory, including its children, with various move options.

BOOLEAN MoveRtFile(
    LPSTR lpExistingFileName,
    LPSTR lpNewFileName,
    DWORD dwFlags
);

Parameters

lpExistingFileName
A pointer to a string containing the existing filename.
lpNewFileName
The new name of the file or directory on the local computer.
dwFlags
This parameter can be one or more of the following values:
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)

Remarks

Also used to rename a file.

Return values

TRUE on success. FALSE on failure. Possible failures include the following (returned from GetLastRtError()):

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

Requirements

Versions Defined in Include Link to
INtime 6.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also