file_copy 1.0.7 copy "file_copy: ^1.0.7" to clipboard
file_copy: ^1.0.7 copied to clipboard

Package for copy files, directories, links. You can watch the copying process.

example/README.md

pub package

Languages:

English Russian

Example of copying file:

  final file = File.fromUri(Uri.file('path_to_file'));

  await FileCopy.copyFile(file, 'path_to_copied_file');
copied to clipboard

Example of copying directory:

  final directory = Directory.fromUri(Uri.directory('path_to_directory'));

  await FileCopy.copyDirectory(directory, 'path_to_copied_directory');
copied to clipboard

Example of monitoring the progress of copying using callback:

  final file = File.fromUri(Uri.file('path_to_file'));

  await FileCopy.copyFile(
    file,
    'path_to_copied_file',
    onChangeProgress: (progress) {
      print(progress.progress);
    },
  );
copied to clipboard

Example of monitoring the progress of copying using stream:

  final directory = Directory.fromUri(Uri.directory('path_to_directory'));

  final observable = FileCopy.watchCopyDirectory(
    directory,
    'path_to_copied_directory',
  );

  observable.progressStream.listen((event) {
    print(event.progress);
  });
copied to clipboard
1
likes
150
points
71
downloads

Publisher

verified publisherbatykov-gleb.ru

Weekly Downloads

2024.09.26 - 2025.04.10

Package for copy files, directories, links. You can watch the copying process.

Repository (GitHub)

Topics

#file #directory #copy

Documentation

API reference

License

MIT (license)

More

Packages that depend on file_copy