rename
Renames a file or directory
&reftitle.description;
boolrename
stringoldname
stringnewname
resourcecontext
Attempts to rename oldname to
newname, moving it between directories if necessary.
If renaming a file and newname exists,
it will be overwritten. If renaming a directory and
newname exists,
this function will emit a warning.
&reftitle.parameters;
oldname
The old name.
The wrapper used in oldname
must match the wrapper used in
newname.
newname
The new name.
On Windows, if newname already exists, it must be writable.
Otherwise rename fails and issues E_WARNING.
context
¬e.context-support;
&reftitle.returnvalues;
&return.success;
&reftitle.examples;
Example with rename
]]>
&reftitle.seealso;
copy
unlink
move_uploaded_file