INtime SDK Help
rename

Renames a file or directory.

#include <stdio.h>
#include <io.h>

int rename (const char *oldname, const char *newname);

Parameters

oldname
Pathname of an existing file or directory to change.
newname
Pathname of a new file or directory.

Remarks

This function invokes the system call rq_s_rename_file to rename the file or directory to the new name.

Return Values

0 (zero).
Success.
Any other value and the function sets errno to one of these values:
EACCES File or directory specified by newname already exists or could not be created (invalid path); or oldname is a directory and newname specifies a different path.
ENOENT File or pathname specified by oldname not found.
EXDEV Attempt to move a file to a different device.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/stdio.h stdio.h
io.h
clib.lib

See Also

rq_s_rename_file