Reference class
A reference to a specific storage location.
This class points to a location in the storage bucket. It provides methods to upload, download, delete, and manage metadata for objects at that location.
Constructors
- Reference({required FusabaseStorage storage, required String fullPath, Reference? parent})
- Constructs a new Reference instance.
Properties
- bucket → String
-
Gets the bucket name for this reference.
no setter
- fullPath → String
-
Gets the full path of this reference.
no setter
- hashCode → int
-
Overrides the hash code based on storage and full path.
no setteroverride
- name → String
-
Gets the name of the object at this reference.
no setter
- parent → Reference?
-
Gets the parent reference.
no setter
- root → Reference
-
Gets the root reference.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → FusabaseStorage
-
final
Methods
-
child(
String path) → Reference - Creates a child reference from the given path.
-
delete(
) → Future< void> - Deletes the object at this reference.
-
getData(
[int maxSize = 10485760]) → Future< Uint8List?> - Downloads the data at this reference.
-
getDownloadURL(
) → Future< String> - Retrieves the download URL for the object.
-
getMetadata(
) → Future< FullMetadata> - Retrieves metadata for the object.
-
list(
[ListOptions? options]) → Future< ListResult> - Lists items and prefixes under this reference (non-recursive).
-
listAll(
) → Future< ListResult> - Lists all items and prefixes under this reference (recursive).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putData(
Uint8List data, [SettableMetadata? metadata]) → UploadTask - Uploads data to this reference.
-
putFile(
dynamic file, [SettableMetadata? metadata]) → UploadTask - Uploads a file to this reference.
-
toString(
) → String -
Returns a string representation of this reference.
override
-
writeToFile(
dynamic file) → DownloadTask - Downloads the object to a local file.
Operators
-
operator ==(
Object other) → bool -
Checks equality with another Reference.
override