StorageReference(const StorageReference & reference)
StorageReference(StorageReference && other)
~StorageReference()
Public functions | |
---|---|
Child(const char *path) const | Gets a reference to a location relative to this one. |
Child(const std::string & path) const | Gets a reference to a location relative to this one. |
Delete() | Future< void > Deletes the object at the current path. |
DeleteLastResult() | Future< void > Returns the result of the most recent call to RemoveValue();. |
GetBytes(void *buffer, size_t buffer_size, Listener *listener, Controller *controller_out) | Future< size_t > Asynchronously downloads the object from this StorageReference. |
GetBytesLastResult() | Future< size_t > Returns the result of the most recent call to GetBytes();. |
GetDownloadUrl() | Future< std::string > Asynchronously retrieves a long lived download URL with a revokable token. |
GetDownloadUrlLastResult() | Future< std::string > Returns the result of the most recent call to GetDownloadUrl();. |
GetFile(const char *path, Listener *listener, Controller *controller_out) | Future< size_t > Asynchronously downloads the object from this StorageReference. |
GetFileLastResult() | Future< size_t > Returns the result of the most recent call to GetFile();. |
GetMetadata() | Retrieves metadata associated with an object at this StorageReference. |
GetMetadataLastResult() | Returns the result of the most recent call to GetMetadata();. |
GetParent() | Returns a new instance of StorageReference pointing to the parent location or null if this instance references the root location. |
PutBytes(const void *buffer, size_t buffer_size, Listener *listener, Controller *controller_out) | Asynchronously uploads data to the currently specified StorageReference, without additional metadata. |
PutBytes(const void *buffer, size_t buffer_size, const Metadata & metadata, Listener *listener, Controller *controller_out) | Asynchronously uploads data to the currently specified StorageReference, without additional metadata. |
PutBytesLastResult() | Returns the result of the most recent call to PutBytes();. |
PutFile(const char *path, Listener *listener, Controller *controller_out) | Asynchronously uploads data to the currently specified StorageReference, without additional metadata. |
PutFile(const char *path, const Metadata & metadata, Listener *listener, Controller *controller_out) | Asynchronously uploads data to the currently specified StorageReference, without additional metadata. |
PutFileLastResult() | Returns the result of the most recent call to PutFile();. |
UpdateMetadata(const Metadata & metadata) | Updates the metadata associated with this StorageReference. |
UpdateMetadataLastResult() | Returns the result of the most recent call to UpdateMetadata();. |
bucket() | std::string Return the Google Cloud Storage bucket that holds this object. |
full_path() | std::string Return the full path of the storage reference, not including the Google Cloud Storage bucket. |
is_valid() const | bool Returns true if this StorageReference is valid, false if it is not valid. |
name() | std::string Returns the short name of this object. |
operator=(const StorageReference & reference) | Copy assignment operator. |
operator=(StorageReference && other) | Move assignment operator. |
storage() | Storage * Gets the firebase::storage::Storage instance to which we refer. |
StorageReferenceChild(constchar*path)const
Gets a reference to a location relative to this one.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | Child relative to this location. |
StorageReferenceChild(conststd::string&path)const
Gets a reference to a location relative to this one.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | Child relative to this location. |
Future<void>Delete()
Future<void>DeleteLastResult()
Returns the result of the most recent call to RemoveValue();.
Details | |
---|---|
Returns | The result of the most recent call to RemoveValue(); |
Future<size_t>GetBytes(void*buffer,size_tbuffer_size,Listener*listener,Controller*controller_out)
Asynchronously downloads the object from this StorageReference.
A byte array will be allocated large enough to hold the entire file in memory. Therefore, using this method will impact memory usage of your process.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||
Returns | A future that returns the number of bytes read. |
Future<size_t>GetBytesLastResult()
Returns the result of the most recent call to GetBytes();.
Details | |
---|---|
Returns | The result of the most recent call to GetBytes(); |
Future<std::string>GetDownloadUrl()
Asynchronously retrieves a long lived download URL with a revokable token.
This can be used to share the file with others, but can be revoked by a developer in the Firebase Console if desired.
Details | |
---|---|
Returns |
Future<std::string>GetDownloadUrlLastResult()
Returns the result of the most recent call to GetDownloadUrl();.
Details | |
---|---|
Returns | The result of the most recent call to GetDownloadUrl(); |
Future<size_t>GetFile(constchar*path,Listener*listener,Controller*controller_out)
Asynchronously downloads the object from this StorageReference.
A byte array will be allocated large enough to hold the entire file in memory. Therefore, using this method will impact memory usage of your process.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
| ||||||
Returns | A future that returns the number of bytes read. |
Future<size_t>GetFileLastResult()
Future<Metadata>GetMetadata()
Retrieves metadata associated with an object at this StorageReference.
Details | |
---|---|
Returns |
Future<Metadata>GetMetadataLastResult()
Returns the result of the most recent call to GetMetadata();.
Details | |
---|---|
Returns | The result of the most recent call to GetMetadata(); |
StorageReferenceGetParent()
Returns a new instance of StorageReference pointing to the parent location or null if this instance references the root location.
Details | |
---|---|
Returns | The parent StorageReference. |
Future<Metadata>PutBytes(constvoid*buffer,size_tbuffer_size,Listener*listener,Controller*controller_out)
Asynchronously uploads data to the currently specified StorageReference, without additional metadata.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||
Returns | A future that returns the Metadata. |
Future<Metadata>PutBytes(constvoid*buffer,size_tbuffer_size,constMetadata&metadata,Listener*listener,Controller*controller_out)
Asynchronously uploads data to the currently specified StorageReference, without additional metadata.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||||
Returns | A future that returns the Metadata. |
Future<Metadata>PutBytesLastResult()
Returns the result of the most recent call to PutBytes();.
Details | |
---|---|
Returns | The result of the most recent call to PutBytes(); |
Future<Metadata>PutFile(constchar*path,Listener*listener,Controller*controller_out)
Asynchronously uploads data to the currently specified StorageReference, without additional metadata.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
| ||||||
Returns | A future that returns the Metadata. |
Future<Metadata>PutFile(constchar*path,constMetadata&metadata,Listener*listener,Controller*controller_out)
Asynchronously uploads data to the currently specified StorageReference, without additional metadata.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||
Returns | A future that returns the Metadata. |
StorageReference()
Default constructor.
This creates an invalid StorageReference. Attempting to perform any operations on this reference will fail unless a valid StorageReference has been assigned to it.
StorageReference(constStorageReference&reference)
Copy constructor.
It's totally okay (and efficient) to copy StorageReference instances, as they simply point to the same location.
Details | |||
---|---|---|---|
Parameters |
|
StorageReference(StorageReference&&other)
Move constructor.
Moving is an efficient operation for StorageReference instances.
Details | |||
---|---|---|---|
Parameters |
|
Future<Metadata>UpdateMetadata(constMetadata&metadata)
Updates the metadata associated with this StorageReference.
Details | |
---|---|
Returns |
Future<Metadata>UpdateMetadataLastResult()
Returns the result of the most recent call to UpdateMetadata();.
Details | |
---|---|
Returns | The result of the most recent call to UpdateMetadata(); |
std::stringbucket()
Return the Google Cloud Storage bucket that holds this object.
Details | |
---|---|
Returns | The bucket. |
std::stringfull_path()
Return the full path of the storage reference, not including the Google Cloud Storage bucket.
Details | |
---|---|
Returns | Full path to the storage reference, not including GCS bucket. For example, for the reference "gs://bucket/path/to/object.txt", the full path would be "path/to/object.txt". |
boolis_valid()const
Returns true if this StorageReference is valid, false if it is not valid.
An invalid StorageReference indicates that the reference is uninitialized (created with the default constructor) or that there was an error retrieving the reference.
Details | |
---|---|
Returns | true if this StorageReference is valid, false if this StorageReference is invalid. |
std::stringname()
Returns the short name of this object.
Details | |
---|---|
Returns | the short name of this object. |
StorageReference&operator=(constStorageReference&reference)
Copy assignment operator.
It's totally okay (and efficient) to copy StorageReference instances, as they simply point to the same location.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | Reference to the destination StorageReference. |
StorageReference&operator=(StorageReference&&other)
Move assignment operator.
Moving is an efficient operation for StorageReference instances.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | Reference to the destination StorageReference. |
Storage*storage()
Gets the firebase::storage::Storage instance to which we refer.
The pointer will remain valid indefinitely.
Details | |
---|---|
Returns | The firebase::storage::Storage instance that this StorageReference refers to. |
~StorageReference()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.