move function

Future<void> move(
  1. String from,
  2. String to, {
  3. bool overwrite = false,
})

Moves the file from to the location to.

createDir('/tmp/folder');
move('/tmp/fred.txt', '/tmp/folder/tom.txt');

from must be a file.

to may be a file or a path.

If to is a file then a rename occurs.

if to is a path then from is moved to the given path.

If the move fails for any reason a MoveException is thrown.

Implementation

Future<void> move(String from, String to, {bool overwrite = false}) async =>
    _Move().move(from, to, overwrite: overwrite);