pasteLocalFile method

  1. @override
Future<SafNewFile> pasteLocalFile(
  1. String srcPath,
  2. String treeUri,
  3. String fileName,
  4. String mime, {
  5. bool? overwrite,
  6. bool? append,
})
override

Implementation

@override
Future<SafNewFile> pasteLocalFile(
  String srcPath,
  String treeUri,
  String fileName,
  String mime, {
  bool? overwrite,
  bool? append,
}) async {
  final map = await methodChannel
      .invokeMapMethod<String, dynamic>('pasteLocalFile', {
        'localSrc': srcPath,
        'treeUri': treeUri.toString(),
        'fileName': fileName,
        'mime': mime,
        'overwrite': overwrite ?? false,
        'append': append ?? false,
      });
  if (map == null) {
    throw Exception('Unexpected empty response from `pasteLocalFile`');
  }
  return SafNewFile.fromMap(map);
}