rename method

  1. @override
Future<SafDocumentFile> rename(
  1. String uri,
  2. bool isDir,
  3. String newName
)
override

Implementation

@override
Future<SafDocumentFile> rename(String uri, bool isDir, String newName) async {
  final map = await methodChannel.invokeMapMethod<String, dynamic>(
    'rename',
    {'uri': uri, 'isDir': isDir, 'newName': newName},
  );
  if (map == null) {
    throw Exception('Failed to rename: $uri');
  }
  return SafDocumentFile.fromMap(map);
}