copyFileImpl function
Implementation
Future<int> copyFileImpl(File src, FileSystemEntity dst,
{CopyOptions? options}) async {
options ??= defaultCopyOptions;
if (await src.fs.isFile(src.path)) {
// delete destination first?
if (options.delete) {
await dst.delete(recursive: true);
}
return await TopCopy(TopEntity(src.fs, src.parent.path),
TopEntity(dst.fs, dst.parent.path), options: options)
.runChild(null, src.fs.path.basename(src.path),
dst.fs.path.basename(dst.path));
//await copyFileSystemEntity_(src, dst, options: options);
} else {
throw ArgumentError('not a file ($src)');
}
}