- Rename (C)
rename is a function in the
C programming language that renames a certain file.The prototype of the function is::
int rename(const char *oldname, const char *newname)
Zero is returned upon success, and other integers are returned upon failure.
The rename function is specified in the
stdio.h libraryheader file in C and thecstdio
header inC++ . It is specified inANSI C .In
POSIX , rename will fail (withEXDEV ) if the old and new names are on different mountedfile system s. [man|sh|rename|SUS|rename a file] OnLinux , if a call to rename succeeds it is guaranteed to have been atomic from the point of view of the current host.References
* [http://www.cppreference.com/stdio/rename.html rename on cppreference.com]
* [http://www.cplusplus.com/ref/cstdio/rename.html rename on cplusplus.com]
Wikimedia Foundation. 2010.