com.google.firebase.storage
Interfaces
OnPausedListener |
A listener that is called if the Task is paused via |
OnProgressListener |
A listener that is called periodically during execution of the |
StorageTask.ProvideError |
An object that returns an exception. |
StreamDownloadTask.StreamProcessor |
A callback that is used to handle the stream download |
Classes
CancellableTask |
Represents an asynchronous operation that can be canceled. |
ControllableTask |
Represents an asynchronous operation that can be paused, resumed and canceled. |
FileDownloadTask |
A task that downloads bytes of a GCS blob to a specified File. |
FileDownloadTask.TaskSnapshot |
Encapsulates state about the running |
FirebaseStorage |
FirebaseStorage is a service that supports uploading and downloading large objects to Google Cloud Storage. |
ListResult |
Contains the prefixes and items returned by a |
StorageMetadata |
Metadata for a |
StorageMetadata.Builder |
Creates a StorageMetadata object. |
StorageReference |
Represents a reference to a Google Cloud Storage object. |
StorageTask |
A controllable Task that has a synchronized state machine. |
StorageTask.SnapshotBase |
Base class for state. |
StreamDownloadTask |
A task that downloads bytes of a GCS blob. |
StreamDownloadTask.TaskSnapshot |
Encapsulates state about the running |
TaskState |
Used to emit events about the progress of storage tasks. |
TaskState.InProgress |
Called periodically as data is transferred and can be used to populate an upload/download indicator. |
TaskState.Paused |
Called any time the upload/download is paused. |
UploadTask |
An controllable task that uploads and fires events for success, progress and failure. |
UploadTask.TaskSnapshot |
Encapsulates state about the running |
Exceptions
StorageException |
Represents an Exception resulting from an operation on a |
Annotations
StorageException.ErrorCode |
An |
Top-level functions summary
StorageMetadata |
storageMetadata(init: StorageMetadata.Builder.() -> Unit)Returns a |
Extension functions summary
operator Long |
Destructuring declaration for |
operator List<StorageReference> |
Destructuring declaration for |
operator Long |
Destructuring declaration for |
operator Long |
Destructuring declaration for |
operator Long |
Destructuring declaration for |
operator List<StorageReference> |
Destructuring declaration for |
operator Long |
Destructuring declaration for |
operator Long |
Destructuring declaration for |
operator String? |
Destructuring declaration for |
operator InputStream |
Destructuring declaration for |
operator StorageMetadata? |
Destructuring declaration for |
operator Uri? |
Destructuring declaration for |
FirebaseStorage |
Firebase.storage(app: FirebaseApp, url: String)Returns the |
FirebaseStorage |
Firebase.storage(app: FirebaseApp)Returns the |
FirebaseStorage |
Returns the |
Extension properties summary
FirebaseStorage |
Returns the |
Flow<TaskState<T>> |
Starts listening to this task's progress and emits its values via a |
Top-level functions
storageMetadata
fun storageMetadata(init: StorageMetadata.Builder.() -> Unit): StorageMetadata
Returns a StorageMetadata object initialized using the init function.
Extension functions
component1
operator fun FileDownloadTask.TaskSnapshot.component1(): Long
Destructuring declaration for FileDownloadTask.TaskSnapshot to provide bytesTransferred.
| Returns | |
|---|---|
Long |
the bytesTransferred of the |
component1
operator fun ListResult.component1(): List<StorageReference>
Destructuring declaration for ListResult to provide its items.
| Returns | |
|---|---|
List<StorageReference> |
the items of the |
component1
operator fun StreamDownloadTask.TaskSnapshot.component1(): Long
Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide bytesTransferred.
| Returns | |
|---|---|
Long |
the bytesTransferred of the |
component1
operator fun UploadTask.TaskSnapshot.component1(): Long
Destructuring declaration for UploadTask.TaskSnapshot to provide bytesTransferred.
| Returns | |
|---|---|
Long |
the bytesTransferred of the |
component2
operator fun FileDownloadTask.TaskSnapshot.component2(): Long
Destructuring declaration for FileDownloadTask.TaskSnapshot to provide totalByteCount.
| Returns | |
|---|---|
Long |
the totalByteCount of the |
component2
operator fun ListResult.component2(): List<StorageReference>
Destructuring declaration for ListResult to provide its prefixes.
| Returns | |
|---|---|
List<StorageReference> |
the prefixes of the |
component2
operator fun StreamDownloadTask.TaskSnapshot.component2(): Long
Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide totalByteCount.
| Returns | |
|---|---|
Long |
the totalByteCount of the |
component2
operator fun UploadTask.TaskSnapshot.component2(): Long
Destructuring declaration for UploadTask.TaskSnapshot to provide totalByteCount.
| Returns | |
|---|---|
Long |
the totalByteCount of the |
component3
operator fun ListResult.component3(): String?
Destructuring declaration for ListResult to provide its pageToken.
| Returns | |
|---|---|
String? |
the pageToken of the |
component3
operator fun StreamDownloadTask.TaskSnapshot.component3(): InputStream
Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.
| Returns | |
|---|---|
InputStream |
the stream of the |
component3
operator fun UploadTask.TaskSnapshot.component3(): StorageMetadata?
Destructuring declaration for UploadTask.TaskSnapshot to provide its metadata.
| Returns | |
|---|---|
StorageMetadata? |
the metadata of the |
component4
operator fun UploadTask.TaskSnapshot.component4(): Uri?
Destructuring declaration for UploadTask.TaskSnapshot to provide its uploadSessionUri.
| Returns | |
|---|---|
Uri? |
the uploadSessionUri of the |
storage
fun Firebase.storage(app: FirebaseApp, url: String): FirebaseStorage
Returns the FirebaseStorage instance of a given FirebaseApp and storage bucket url.
storage
fun Firebase.storage(app: FirebaseApp): FirebaseStorage
Returns the FirebaseStorage instance of a given FirebaseApp.
storage
fun Firebase.storage(url: String): FirebaseStorage
Returns the FirebaseStorage instance for a custom storage bucket at url.
Extension properties
storage
val Firebase.storage: FirebaseStorage
Returns the FirebaseStorage instance of the default FirebaseApp.
taskState
val StorageTask<T>.taskState: Flow<TaskState<T>>
Starts listening to this task's progress and emits its values via a Flow.
-
When the returned flow starts being collected, it attaches the following listeners:
OnProgressListener,OnPausedListener,OnCompleteListener. -
When the flow completes the listeners will be removed.