copyToDisk method

  1. @override
Future<void> copyToDisk(
  1. String diskId, {
  2. required String sourcePath,
  3. bool parallel = true,
  4. FileCopyProgressCallback? onProgress,
  5. required String relativePath,
})
override

Copies an absolute sourcePath to relativePath inside mounted diskId. The destination must not exist and its parent directory must exist. Preserves nested symlinks; reject destinations escaping the volume root. A failed copy can leave partial data; no overwrite or merge is performed.

Implementation

@override
Future<void> copyToDisk(
  String diskId, {
  required String sourcePath,
  bool parallel = true,
  FileCopyProgressCallback? onProgress,
  required String relativePath,
}) =>
    _copyOperation(
        'copyToDisk',
        diskId,
        {
          'relativePath': relativePath,
          'localPath': sourcePath,
          'parallel': parallel,
        },
        onProgress);