moveFile static method
Implementation
static Future<File> moveFile(String source, String destination) async {
ReceivePort receivePort = ReceivePort();
Isolate isolate = await Isolate.spawn(
_copyFileIsolate,
_CopyFileArguments(source, destination, receivePort.sendPort, true),
);
await receivePort.first;
isolate.kill();
var destFile = File(destination);
if (!destFile.existsSync()) {
throw Exception('file wasn\'t moved');
}
return destFile;
}