listCollectionKeys static method
List keys in a collection
Implementation
static Future<CollectionFrameResponse> listCollectionKeys(
P2PStream stream, {
required PeerId ownerPeerId,
required String path,
int? limit,
int? offset,
String? cursor,
}) async {
try {
final requestBytes = CollectionFrame.encodeRequest(
operation: 'LIST',
ownerPeerId: ownerPeerId,
path: path,
limit: limit,
offset: offset,
cursor: cursor,
);
await _writeFrameStatic(stream, requestBytes);
final responseBytes = await _readFrameStatic(stream);
return CollectionFrame.decodeResponse(responseBytes);
} catch (e, stackTrace) {
_logger.severe('Error listing collection keys: $e', e, stackTrace);
rethrow;
}
}