list method
Obtains the list of files and subdirectories with a specified number in a directory.
- max: Total number of files and subdirectories to be obtained. Value of max ranges from 1 to 1000.
- pageMarker: Pagination marker.
Implementation
Future<AGCStorageListResult> list(int max, [String? pageMarker]) async {
try {
final Map<dynamic, dynamic>? result =
await _methodChannel.invokeMethod<Map<dynamic, dynamic>?>(
'AGCStorageReference#list',
<String, dynamic>{
'bucket': storage.bucket,
'policyIndex': storage.policy?.index,
'objectPath': path,
'max': max,
'pageMarker': pageMarker,
},
);
return AGCStorageListResult._(
storage, Map<String, dynamic>.from(result!));
} catch (e) {
throw AGCStorageException._from(e);
}
}