Details | |
---|---|
Returns | the bucket. |
stringName
Returns the short name of this object.
Details | |
---|---|
Returns | the name. |
StorageReferenceParent
Returns a new instance of StorageReference pointing to the parent location or null if this instance references the root location.
For example:
path=foo/bar/bazparent=foo/barpath=fooparent=(root)path=(root)parent=(null)
Details | |
---|---|
Returns | the parent StorageReference |
stringPath
Returns the full path to this object, not including the Google Cloud Storage bucket.
Details | |
---|---|
Returns | the path. |
StorageReferenceRoot
Returns a new instance of StorageReference pointing to the root location.
Details | |
---|---|
Returns | the root StorageReference |
FirebaseStorageStorage
Returns the FirebaseStorage service which created this reference.
Details | |
---|---|
Returns | The FirebaseStorage service. |
StorageReferenceChild(stringpathString)
Returns a new instance of StorageReference pointing to a child location of the current reference.
All leading and trailing slashes will be removed, and consecutive slashes will be compressed to single slashes. For example:
child=/foo/barpath=foo/barchild=foo/bar/path=foo/barchild=foo///bar path = foo/bar
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | the child StorageReference |
TaskDeleteAsync()
Deletes the object at this StorageReference
Details | |
---|---|
Returns | A Task which can be used to monitor the operation and obtain the result. |
overrideboolEquals(objectother)
Compares two storage reference URIs.
Details | |
---|---|
Returns | true if two references point to the same path, false otherwise. |
Task<byte[]>GetBytesAsync(longmaxDownloadSizeBytes)
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. If you are downloading many large files,
may be a better option.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | A Task which can be used to monitor the operation and obtain the result. |
Task<byte[]>GetBytesAsync(longmaxDownloadSizeBytes,IProgress<DownloadState>progressHandler,CancellationTokencancelToken)
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. If you are downloading many large files,
may be a better option.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
| ||||||
Returns | A Task which can be used to monitor the operation and obtain the result. |
Task<Uri>GetDownloadUrlAsync()
Retrieves a long lived download URL with a revokable token.
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 | A Task which can be used to monitor the operation and obtain the result. |
TaskGetFileAsync(stringdestinationFilePath,IProgress<DownloadState>progressHandler,CancellationTokencancelToken)
Downloads the object at this StorageReference to a specified system filepath.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
| ||||||
Returns | A Task which can be used to monitor the operation and obtain the result. |
overrideintGetHashCode()
Create a hash of the URI string used by this reference.
Details | |
---|---|
Returns | Hash of this reference's URI. |
Task<StorageMetadata>GetMetadataAsync()
Retrieves metadata associated with an object at this StorageReference
Details | |
---|---|
Returns | A Task which can be used to monitor the operation and obtain the result. |
Task<Stream>GetStreamAsync()
Downloads the object at this StorageReference via a Stream The resulting InputStream should be not be accessed on the main thread because calling into it may block the calling thread.
Details | |
---|---|
Returns | A Task which can be used to monitor the operation. |
TaskGetStreamAsync(Action<Stream>streamProcessor,IProgress<DownloadState>progressHandler,CancellationTokencancelToken)
Downloads the object at this StorageReference via a Stream
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
| ||||||
Returns | A Task which can be used to monitor the operation and obtain the result. |
Task<StorageMetadata>PutBytesAsync(byte[]bytes,MetadataChangecustomMetadata,IProgress<UploadState>progressHandler,CancellationTokencancelToken,UripreviousSessionUri)
Uploads byte data to this StorageReference This is not recommended for large files.
Instead upload a file via
or a Stream via
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||||
Returns | A Task which can be used to monitor the upload. |
Task<StorageMetadata>PutFileAsync(stringfilePath,MetadataChangecustomMetadata,IProgress<UploadState>progressHandler,CancellationTokencancelToken,UripreviousSessionUri)
Uploads from a content URI to this StorageReference
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||||
Returns | A Task which can be used to monitor the upload. |
Task<StorageMetadata>PutStreamAsync(Streamstream,MetadataChangecustomMetadata,IProgress<UploadState>progressHandler,CancellationTokencancelToken,UripreviousSessionUri)
Uploads a stream of data to this StorageReference The stream will remain open at the end of the upload.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||||
Returns | A Task which can be used to monitor the upload. |
overridestringToString()
Details | |
---|---|
Returns | This object in URI form, which can then be shared and passed into FirebaseStorage.GetReferenceFromUrl |
Task<StorageMetadata>UpdateMetadataAsync(MetadataChangemetadata)
Updates the metadata associated with this StorageReference
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | a System.Threading.Tasks.Task that will return the final StorageMetadata once the operation is complete. |
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 2022-07-27 UTC.