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');

Example of copying directory:

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

  await FileCopy.copyDirectory(directory, 'path_to_copied_directory');

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);
    },
  );

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);
  });
1
likes
150
pub points
74%
popularity

Publisher

verified publisherbatykov-gleb.ru

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

Repository (GitHub)
View/report issues

Topics

#file #directory #copy

Documentation

API reference

License

MIT (license)

More

Packages that depend on file_copy