listContents method

  1. @override
Future<List<NsFileCoordinatorEntity>> listContents(
  1. String url, {
  2. bool? recursive,
  3. bool? filesOnly,
  4. bool scoped = true,
})
override

Implementation

@override
Future<List<NsFileCoordinatorEntity>> listContents(String url,
    {bool? recursive, bool? filesOnly, bool scoped = true}) async {
  var entityMaps = await methodChannel
      .invokeListMethod<Map<dynamic, dynamic>>('listContents', {
    'url': url.toString(),
    'recursive': recursive,
    'filesOnly': filesOnly,
    'scoped': scoped
  });
  if (entityMaps == null) {
    return [];
  }
  return entityMaps.map((e) => NsFileCoordinatorEntity.fromJson(e)).toList();
}