copy method

  1. @override
Future<void> copy(
  1. Entry from,
  2. Entry to
)
override

Copy file or dir

Implementation

@override
Future<void> copy(Entry from, Entry to) async {
  final entityType = FileSystemEntity.typeSync(from.path);
  if (entityType == FileSystemEntityType.directory) {
    await copyPath(from.path, to.path);
  } else if (entityType == FileSystemEntityType.file) {
    await File(from.path).copy(to.path);
  }
}