getDirectoryMetadata method

Future<List<FileMetadata>> getDirectoryMetadata(
  1. String directoryPath
)

Retrieves a directory's contents' metadata from the backend.

Throws an ApiException if the metadata retrieval fails.

Implementation

Future<List<FileMetadata>> getDirectoryMetadata(String directoryPath) async {
  assert(
      directoryPath.endsWith('/'),
      '$directoryPath is not a valid directory path, because it does not '
      'end with a /');
  return await _apiClient.get(
    _metadataPath(directoryPath),
    headers: _session.authenticationHeaders,
    responseDeserializer: listOf(FileMetadata.fromJson),
  );
}