copy method

Future<void> copy(
  1. String? srcRepo,
  2. String srcPath,
  3. String? dstRepo,
  4. String dstPath,
)
inherited

Copy file or directory into, from or between repositories

  • src_repo: Name of the repository from which file will be copied.
  • src_path: Path of to the entry to be copied. If src_repo is set, the src_path is relative to the corresponding repository root. If src_repo is null, src_path is interpreted as path on the local file system.
  • dst_repo: Name of the repository into which the entry will be copied.
  • dst_path: Destination entry

Implementation

Future<void> copy(
  String? srcRepo,
  String srcPath,
  String? dstRepo,
  String dstPath,
) async {
  final request = RequestSessionCopy(
    srcRepo: srcRepo,
    srcPath: srcPath,
    dstRepo: dstRepo,
    dstPath: dstPath,
  );
  final response = await client.invoke(request);
  switch (response) {
    case ResponseNone(): return;
    default: throw UnexpectedResponse();
  }
}