The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/storage > listAll

listAll() function

List all items (files) and prefixes (folders) under this storage reference.

This is a helper method for calling list() repeatedly until there are no more results. The default pagination size is 1000.

Note: The results may not be consistent if objects are changed while this operation is running.

Warning: listAll may potentially consume too many resources if there are too many results.

Signature:

export declare function listAll(ref: StorageReference): Promise<ListResult>;

Parameters

Parameter Type Description
ref StorageReference StorageReference to get list from.

Returns:

Promise<ListResult>

A Promise that resolves with all the items and prefixes under the current storage reference. prefixes contains references to sub-directories and items contains references to objects in this folder. nextPageToken is never returned.