Also: Google Play
services
Represents a reference to a Google Cloud Storage object. Developers can upload and download objects, get/set object metadata, and delete an object at a specified path. (see Google Cloud Storage)
Public Method Summary
StorageReference |
child(String pathString)
Returns a new instance of
StorageReference
pointing to a child location of the current reference.
|
int |
compareTo(StorageReference
other)
|
Task<Void> |
delete()
Deletes the object at this
StorageReference .
|
boolean | |
List<FileDownloadTask> | |
List<UploadTask> | |
String |
getBucket()
Return the Google Cloud Storage bucket that holds this object.
|
Task<byte[]> |
getBytes(long maxDownloadSizeBytes)
Asynchronously downloads the object from this
StorageReference
A byte array will be allocated large enough to hold the entire file in memory.
|
Task<Uri> |
getDownloadUrl()
Asynchronously retrieves a long lived download URL with a revokable token.
|
FileDownloadTask |
getFile(File destinationFile)
Asynchronously downloads the object at this
StorageReference
to a specified system filepath.
|
FileDownloadTask |
getFile(Uri destinationUri)
Asynchronously downloads the object at this
StorageReference
to a specified system filepath.
|
Task<StorageMetadata> |
getMetadata()
Retrieves metadata associated with an object at this
StorageReference .
|
String |
getName()
Returns the short name of this object.
|
StorageReference |
getParent()
Returns a new instance of
StorageReference
pointing to the parent location or null if this instance references the root
location.
|
String |
getPath()
Returns the full path to this object, not including the Google Cloud Storage
bucket.
|
StorageReference |
getRoot()
Returns a new instance of
StorageReference
pointing to the root location.
|
FirebaseStorage |
getStorage()
Returns the
FirebaseStorage
service which created this reference.
|
StreamDownloadTask |
getStream(StreamDownloadTask.StreamProcessor
processor)
Asynchronously downloads the object at this
StorageReference
via a InputStream .
|
StreamDownloadTask |
getStream()
Asynchronously downloads the object at this
StorageReference
via a InputStream .
|
int |
hashCode()
|
Task<ListResult> | |
Task<ListResult> |
list(int maxResults)
List up to
maxResults items (files) and prefixes (folders) under
this StorageReference.
|
Task<ListResult> |
listAll()
List all items (files) and prefixes (folders) under this StorageReference.
|
UploadTask |
putBytes(byte[] bytes, StorageMetadata
metadata)
Asynchronously uploads byte data to this
StorageReference .
|
UploadTask |
putBytes(byte[] bytes)
|