Gdb/rename
Next: unlink, Previous: lseek, Up: List of Supported Calls [Contents][Index]
rename
- Synopsis:
int rename(const char *oldpath, const char *newpath);
- Request:
‘
Frename,oldpathptr/len,newpathptr/len
’- Return value:
On success, zero is returned. On error, -1 is returned.
- Errors:
EISDIR
newpath
is an existing directory, butoldpath
is not a directory.EEXIST
newpath
is a non-empty directory.EBUSY
oldpath
ornewpath
is a directory that is in use by some process.EINVAL
An attempt was made to make a directory a subdirectory of itself.
ENOTDIR
A component used as a directory in
oldpath
or new path is not a directory. Oroldpath
is a directory andnewpath
exists but is not a directory.EFAULT
oldpathptr
ornewpathptr
are invalid pointer values.EACCES
No access to the file or the path of the file.
ENAMETOOLONG
oldpath
ornewpath
was too long.ENOENT
A directory component in
oldpath
ornewpath
does not exist.EROFS
The file is on a read-only filesystem.
ENOSPC
The device containing the file has no room for the new directory entry.
EINTR
The call was interrupted by the user.