Package-level declarations

Types

Link copied to clipboard
actual abstract class CancellableTask<StateT> : Task<StateT>
expect abstract class CancellableTask<StateT>

A Task that can be cancelled and reports progress, as the Android SDK's CancellableTask.

actual abstract class CancellableTask<StateT> : Task<StateT>
actual abstract class CancellableTask<StateT>
Link copied to clipboard
actual abstract class ControllableTask<StateT> : CancellableTask<StateT>
expect abstract class ControllableTask<StateT> : CancellableTask<StateT>

A CancellableTask that can also be paused and resumed, as the Android SDK's ControllableTask.

actual abstract class ControllableTask<StateT> : CancellableTask<StateT>
actual abstract class ControllableTask<StateT> : CancellableTask<StateT>
Link copied to clipboard

Only the snapshot type is declared here: the Task members, and the platform hooks that the shared non-JVM StorageTask leaves abstract (StorageTask.reference, StorageTask.snapshotWith and the control functions), are implemented by FileDownloadTaskImpl. The metadata compilation of this source set rejects an actual class that implements a member its expect class inherits as abstract from another source set's actual ("the modalities are different").

A download to a file, as the Android SDK's FileDownloadTask; TaskSnapshot reports its progress.

A download to a file on JS, which the SDK cannot do: the task fails at once with UnsupportedOperationException.

A download to a file on JS, which the SDK cannot do: the task fails at once with UnsupportedOperationException.

Link copied to clipboard
actual class FirebaseStorage
actual class FirebaseStorage
expect class FirebaseStorage

Cloud Storage for Firebase, as the Android SDK's com.google.firebase.storage.FirebaseStorage. The download retry time, file downloads and FileDownloadTask exist on Android, the JVM and Apple platforms (nonJsMain); the JS SDK downloads through URLs only.

actual class FirebaseStorage
actual class FirebaseStorage
actual class FirebaseStorage
Link copied to clipboard
actual class ListResult
expect class ListResult

A page of the items and prefixes (folders) under a reference, as the Android SDK's ListResult.

actual class ListResult
actual class ListResult
Link copied to clipboard
fun interface OnPausedListener<in ProgressT>

Receives the snapshots of a paused task; the Android SDK's OnPausedListener.

Link copied to clipboard
fun interface OnProgressListener<in ProgressT>

Receives the snapshots of a task as it makes progress; the Android SDK's OnProgressListener.

Link copied to clipboard
expect open class StorageException

An error of Cloud Storage, as the Android SDK's StorageException; errorCode is one of the ERROR_* constants.

actual open class StorageException
Link copied to clipboard
actual class StorageMetadata
expect class StorageMetadata

The metadata of an object in Cloud Storage, as the Android SDK's StorageMetadata: the server-set fields are read from a fetched object, the settable fields are built with Builder (chained setters or, from Kotlin, properties: storageMetadata { contentType = "text/plain" }).

actual class StorageMetadata
actual class StorageMetadata
Link copied to clipboard

A reference to an object or folder in Cloud Storage, as the Android SDK's StorageReference. Files are given as android.net.Uri (the firebase-app stand-in off Android): a file: URL, or a path on Apple platforms. The members taking JDK types are declared through the error-deprecated java.io.File and java.io.InputStream stand-ins, pointing common code at the kotlinx-io getFile(Path) and putStream(RawSource) extensions (see StorageSources.kt).

Link copied to clipboard

A long-running Cloud Storage operation with progress, pause, resume and cancel, as the Android SDK's StorageTask. Listeners are called on the thread that completes or progresses the task on Apple platforms and JS. The Task members (isComplete, result, exception, ...) are inherited; the task subclasses are abstract, as instances only come from a StorageReference.

Link copied to clipboard
abstract class TaskState<T>

The state of a StorageTask as emitted by taskState.

Link copied to clipboard

An upload to a StorageReference, as the Android SDK's UploadTask; TaskSnapshot reports its progress.

Properties

Link copied to clipboard
val <Error class: unknown class>.storage: FirebaseStorage

The FirebaseStorage of the default FirebaseApp; the Android SDK's Firebase.storage.

Link copied to clipboard

The progress and pauses of this task as a Flow, which completes with the task.

Functions

Link copied to clipboard

The bytes downloaded so far.

The items of the page.

The bytes uploaded so far.

Link copied to clipboard

The total size of the download.

The prefixes of the page.

The total size of the upload.

Link copied to clipboard
operator fun ListResult.component3(): String?

The token of the next page.

The metadata of the uploaded object, once complete.

Link copied to clipboard
operator fun UploadTask.TaskSnapshot.component4(): <Error class: unknown class>?

The resumable upload session URL, Android only.

Link copied to clipboard
actual fun StorageReference.getFile(destination: Path): FileDownloadTask

The SDK's own file form. Shipped (see keepClasses in build.gradle.kts).

actual fun StorageReference.getFile(destination: <Error class: unknown class>): FileDownloadTask
expect fun StorageReference.getFile(destination: <Error class: unknown class>): FileDownloadTask

Downloads the object to the file at destination; the kotlinx-io form of getFile(File). Fails on JS, whose SDK has no file downloads (behind @UnsupportedOnJs there).

actual fun StorageReference.getFile(destination: <Error class: unknown class>): FileDownloadTask

Fails: the JS SDK downloads through URLs, not to files; use StorageReference.getBytes or StorageReference.getDownloadUrl.

actual fun StorageReference.getFile(destination: Path): FileDownloadTask

The SDK's own file form. Shipped (see keepClasses in build.gradle.kts).

actual fun StorageReference.getFile(destination: <Error class: unknown class>): FileDownloadTask

Fails: the JS SDK downloads through URLs, not to files; use StorageReference.getBytes or StorageReference.getDownloadUrl.

Link copied to clipboard
fun StorageReference.putStream(source: <Error class: unknown class>): UploadTask

Uploads the bytes of source to this reference, closing it; the kotlinx-io form of putStream(InputStream). On Android and the JVM the SDK streams the source as it uploads; the Apple and JS SDKs upload whole buffers, so there the source is read to its end first (off the caller's thread on Apple platforms, at once on JS).

fun StorageReference.putStream(source: <Error class: unknown class>, metadata: StorageMetadata): UploadTask

Uploads the bytes of source to this reference with metadata; see putStream.

Link copied to clipboard
fun <Error class: unknown class>.storage(app: <Error class: unknown class>): FirebaseStorage
fun <Error class: unknown class>.storage(url: String): FirebaseStorage

The FirebaseStorage of the default FirebaseApp for the bucket of url.

fun <Error class: unknown class>.storage(app: <Error class: unknown class>, url: String): FirebaseStorage

The FirebaseStorage of app for the bucket of url.

Link copied to clipboard