copyTo method
Implementation
Future<Directory> copyTo(Directory destination, [bool skipTopDirectory = false]) async {
if (this is Directory) {
return (this as Directory).copy(destination, skipTopDirectory);
}
if (this is File) {
await destination.create(recursive: true);
var p = path.join(destination.path, name).fixPath;
await (this as File).copy(p);
}
return destination;
}