listFiles method

Future<ListFilesResult> listFiles(
  1. String channel, {
  2. int? limit,
  3. String? next,
  4. Keyset? keyset,
  5. String? using,
})

Lists all files in a channel.

You can limit this list by providing limit parameter.

Pagination can be managed by using next parameter.

If keyset is not provided, then it tries to obtain a keyset using name. If that fails, then it uses the default keyset. If that fails as well, then it will throw InvariantException.

Implementation

Future<ListFilesResult> listFiles(String channel,
    {int? limit, String? next, Keyset? keyset, String? using}) async {
  keyset ??= _core.keysets[using];

  return defaultFlow<ListFilesParams, ListFilesResult>(
      keyset: keyset,
      core: _core,
      params: ListFilesParams(keyset, channel, limit: limit, next: next),
      serialize: (object, [_]) => ListFilesResult.fromJson(object));
}