copyFileSystemEntityImpl function

Future<int> copyFileSystemEntityImpl(
  1. FileSystemEntity src,
  2. FileSystemEntity dst, {
  3. CopyOptions? options,
})

Implementation

Future<int> copyFileSystemEntityImpl(FileSystemEntity src, FileSystemEntity dst,
    {CopyOptions? options}) async {
  if (await src.fs.isDirectory(src.path)) {
    return await copyDirectoryImpl(asDirectory(src), asDirectory(dst),
        options: options);
  } else if (await src.fs.isFile(src.path)) {
    return await copyFileImpl(asFile(src), dst, options: options);
  }
  return 0;
}