rename
fn
void rename(RF, RT)(RF from, RT to) if ((isSomeFiniteCharInputRange!RF || isSomeString!RF) && !isConvertibleToString!RF &&
(isSomeFiniteCharInputRange!RT || isSomeString!RT) && !isConvertibleToString!RT)Rename file from _to to, moving it between directories if required. If the target file exists, it is overwritten.
It is not possible to rename a file across different mount points or drives. On POSIX, the operation is atomic. That means, if to already exists there will be no time period during the operation where to is missing. See
for more details.
Parameters
from | string or range of characters representing the existing file name |
to | string or range of characters representing the target file name |
Throws
FileException on error.
fn
void rename(RF, RT)(auto ref RF from, auto ref RT to) if (isConvertibleToString!RF || isConvertibleToString!RT)ditto