StorageReference
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).
Properties
The downloads from this reference that have not completed; always empty on JS.
Always empty: the JS SDK has no file downloads.
Always empty: the JS SDK has no file downloads.
The uploads to this reference that have not completed.
The underlying Firebase JS SDK object.
The underlying Firebase JS SDK object.
The parent folder, or null at the root.
The root of the bucket.
Functions
Downloads the object into memory, failing if it is larger than maxDownloadSizeBytes.
The public download URL of the object. The Android SDK's task carries an android.net.Uri; here the result is typed as Any so that common code can call toString() on it (the Uri on Android, the URL string elsewhere).
Downloads the object to the file at destinationUri. Fails on JS, whose SDK has no file downloads.
Android/JVM only: downloads to a java.io.File; common code downloads to a kotlinx-io Path through getFile(Path), or to a Uri.
Fails: the JS SDK downloads through URLs, not to files; use getBytes or getDownloadUrl.
Fails: the JS SDK downloads through URLs, not to files; use getBytes or getDownloadUrl.
The SDK's own file form. Shipped (see keepClasses in build.gradle.kts).
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).
Fails: the JS SDK downloads through URLs, not to files; use StorageReference.getBytes or StorageReference.getDownloadUrl.
The SDK's own file form. Shipped (see keepClasses in build.gradle.kts).
Fails: the JS SDK downloads through URLs, not to files; use StorageReference.getBytes or StorageReference.getDownloadUrl.
The object's metadata.
Lists up to maxResults items and prefixes under this reference.
Lists the next page of up to maxResults items and prefixes, continuing from pageToken.
Lists every item and prefix under this reference.
Uploads the file at uri to this reference. Fails on JS, whose SDK cannot read a file by its URL.
Fails: the JS SDK cannot read a file by its URL; use putBytes, or the dev.gitlive wrapper's putFile with a browser File.
Fails: the JS SDK cannot read a file by its URL; use putBytes, or the dev.gitlive wrapper's putFile with a browser File.
Android/JVM only: uploads a java.io.InputStream; common code uploads a kotlinx-io source through putStream(RawSource).
Android/JVM only: uploads a java.io.InputStream with metadata; common code uses putStream(RawSource, StorageMetadata).
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).