Go to the previous, next section.
int rename(const char *src, const char *dest);
src: [in] the file to more/rename.
dest: [in] the new name or place for the file.
Renames and move files. The destination is overwriten if it already exists.
On success, returns zero. On error, returns -1 and sets errno
to
one of the following value:
EISDIR
: newpath is an existing directory, but
src is not.
EPERM
: the directory containing src and the task's
effective uid is not equal to the uid of the file or the directory
containing it, or the file system does not support renaming.
EXDEV
, ENOTEMPTY
, EMLINK
, ENOTDIR
,
EFAULT
, EACCESS
, ENAMETOOLONG
, ENOENT
,
ENOMEM
, EROFS
, ELOOP
or ENOSPC
.
Go to the previous, next section.