<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/storage](./storage.md) &gt; [listAll](./storage.listall.md)

## 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.

<b>Signature:</b>

```typescript
export declare function listAll(ref: StorageReference): Promise<ListResult>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  ref | [StorageReference](./storage.storagereference.md) | StorageReference to get list from. |

<b>Returns:</b>

Promise&lt;[ListResult](./storage.listresult.md)<!-- -->&gt;

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.

