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.
context
¬e.context-support;
&reftitle.returnvalues;
&return.success;
&reftitle.changelog;
&Version;
&Description;
5.3.1
rename can now rename files across drives in
Windows.
&reftitle.examples;
Example with rename
]]>
&reftitle.seealso;
copy
unlink
move_uploaded_file