createStorageListStore()
createStorageListStore(storage, ref, options)
creates a store that will contain a
list of files at the given reference. The store will update when the list changes.
Parameters
storage: FirebaseStorage
- The firebase storage instance. If you put the component at the root of your app, or higher than where you're using this store, you can usenull
orundefined
as the parameter and the store will retrieve the database instance from the context.ref: string | StorageReference
- The storage reference to the file list.options?: StorageListStoreOptions
- Options for the store.
Properties
subscribe: ((val: ListResult) => void)) => void
- Subscribe method for the Svelte store. Allows for the `$store` syntax.ref: StorageReference
- The storage reference to the files you want to get.loading: boolean
- When the storage reference is loading.error: Error | null
- Error if any.
Types
interface StorageListStoreOptions<T> {
subscribe: ((val: ListResult) => void) => void;
ref: StorageReference;
loading: boolean;
error: Error | null;
}