AGCStorageReference class

References to cloud files. It encapsulates operations such as listing, uploading, downloading, and deleting files, and updating metadata.

Properties

bucket String?
Name of a storage instance to which the reference belongs. If value is null, it means that default bucket is used.
final
hashCode int
The hash code for this object.
no setteroverride
name String
Name of a file or directory on the cloud.
final
parent AGCStorageReference?
Obtains the reference to the parent directory. If the current directory is the root directory, null will return.
no setter
path String
Path to a file or directory on the cloud.
final
root AGCStorageReference
Obtains the reference to the root directory.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage AGCStorage
AGCStorage instance to which the reference belongs.
final

Methods

child(String path) AGCStorageReference
Obtains the reference to a subdirectory.
deleteFile() Future<void>
Deletes a file from the cloud.
downloadData([int maxSize = 10485760]) Future<Uint8List?>
Downloads specified data from the cloud to a Uint8List object.
downloadToFile(File destinationFile) Future<AGCStorageDownloadTask>
Downloads a file from the cloud to a local path and specifies the file name. The file is managed by your app. When the local file is not 0 KB, the API uses the downloaded file size as the resumable download position to proceed with download from the cloud.
getActiveDownloadTasks() Future<List<AGCStorageDownloadTask>>
Obtains the ongoing download task list under the current reference.
getActiveUploadTasks() Future<List<AGCStorageUploadTask>>
Obtains the ongoing upload task list under the current reference.
getDownloadUrl() Future<String>
Obtains the sharing URL of a cloud file.
getMetadata() Future<AGCStorageMetadata>
Obtains metadata of a file or directory.
list(int max, [String? pageMarker]) Future<AGCStorageListResult>
Obtains the list of files and subdirectories with a specified number in a directory.
listAll() Future<AGCStorageListResult>
Obtains all objects in a directory, including files and subdirectories.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
updateMetadata(AGCStorageSettableMetadata metadata) Future<AGCStorageMetadata>
Updates file metadata in overwrite mode.
uploadData(Uint8List data, {AGCStorageSettableMetadata? metadata, int offset = 0}) Future<AGCStorageUploadTask>
Uploads data to the cloud. You must set sha256 value to metadata for resumable uploads.
uploadFile(File file, {AGCStorageSettableMetadata? metadata, int offset = 0}) Future<AGCStorageUploadTask>
Uploads file to the cloud. You must set sha256 value to metadata for resumable uploads.

Operators

operator ==(Object other) bool
The equality operator.
override