copy function
Copies the file from
to the path to
.
copy("/tmp/fred.text", "/tmp/fred2.text", overwrite=true);
to
may be a directory in which case the from
filename is
used to construct the to
files full path.
The to
file must not exists unless overwrite
is set to true.
The default for overwrite
is false.
If an error occurs a CopyException is thrown.
Implementation
void copy(String from, String to, {bool overwrite = false}) =>
_Copy().copy(from, to, overwrite: overwrite);