@@ -204,7 +204,7 @@ export class Reference {
204
204
}
205
205
206
206
/**
207
- * List all items and prefixes under the current storage reference.
207
+ * List all items (files) and prefixes (folders) under this storage reference.
208
208
*
209
209
* It is a helper method for calling list() recursively until there is no
210
210
* more results. The default pagination size is 200.
@@ -245,20 +245,30 @@ export class Reference {
245
245
}
246
246
247
247
/**
248
- * List items and prefixes within this directory .
248
+ * List items (files) and prefixes (folders) under this storage reference .
249
249
*
250
- * "/" is treated as a path delimiter. Firebase storage does not support
251
- * invalid object path that ends with "/" or contains two consecutive "//".
252
- * All invalid objects in GCS will be filtered.
250
+ * GCS is a key-blob store. Firebase storage impose the semantic of '/'
251
+ * delimited folder structure.
252
+ * Objects whose paths, aside from the prefix, contain '/' will have
253
+ * their path, truncated after the '/', returned in prefixes.
254
+ * Duplicate prefixes are omitted.
255
+ * Objects whose paths, aside from the prefix, do not contain '/' will
256
+ * be returned in items.
257
+ *
258
+ * Firebase storage does not support invalid object paths that end with
259
+ * "/" or contain two consecutive "/"s. All invalid objects in GCS will be
260
+ * filtered by GCS.
261
+ * list() may fail if there are too many invalid objects in the bucket.
253
262
*
254
263
* @param options.maxResults If set, limits the total number of `prefixes`
255
- * and `items` to return.
264
+ * and `items` to return. The default and maximum maxResults is 1000.
265
+ * Use the nextPageToken to retrieve more objects.
256
266
* @param options.pageToken The `nextPageToken` from a previous call to
257
267
* list(). If provided, listing is resumed from the previous position.
258
268
* @return A promise that resolves with the items and prefixes.
259
- * `prefixes` contains references to prefixes and `items`
269
+ * `prefixes` contains references to sub-folders and `items`
260
270
* contains references to objects in this folder. `nextPageToken`
261
- * can be passed as `options.pageToken` to get the rest of results.
271
+ * can be used to get the rest of the results.
262
272
*/
263
273
list ( options ?: ListOptions | null ) : Promise < ListResult > {
264
274
args . validate ( 'list' , [ listOptionSpec ( true ) ] , arguments ) ;
0 commit comments