FirebaseStorage Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
@interface FIRStorageMetadata : NSObject
Class which represents the metadata on an object in Firebase Storage. This metadata is
returned on successful operations, and can be used to retrieve download URLs, content types,
and a Storage reference to the object in question. Full documentation can be found at the GCS
Objects#resource docs.
-
The name of the bucket containing this object.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull bucket;
-
Cache-Control directive for the object data.
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nullable cacheControl;
-
Content-Disposition of the object data.
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nullable contentDisposition;
-
Content-Encoding of the object data.
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nullable contentEncoding;
-
Content-Language of the object data.
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nullable contentLanguage;
-
Content-Type of the object data.
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nullable contentType;
-
MD5 hash of the data; encoded using base64.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nullable md5Hash;
-
The content generation of this object. Used for object versioning.
Declaration
Objective-C
@property (nonatomic, readonly) int64_t generation;
-
User-provided metadata, in key/value pairs.
Declaration
Objective-C
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> *_Nullable customMetadata;
-
The version of the metadata for this object at this generation. Used
for preconditions and for detecting changes in metadata. A metageneration number is only
meaningful in the context of a particular generation of a particular object.
Declaration
Objective-C
@property (nonatomic, readonly) int64_t metageneration;
-
The name of this object, in gs://bucket/path/to/object.txt, this is object.txt.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nullable name;
-
The full path of this object, in gs://bucket/path/to/object.txt, this is path/to/object.txt.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nullable path;
-
Content-Length of the data in bytes.
Declaration
Objective-C
@property (nonatomic, readonly) int64_t size;
-
The creation time of the object in RFC 3339 format.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSDate *_Nullable timeCreated;
-
The modification time of the object metadata in RFC 3339 format.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSDate *_Nullable updated;
-
Declaration
Objective-C
@property (nonatomic, strong, readonly) SWIFT_DEPRECATED FIRStorageReference *storageReference;
-
Creates a Dictionary from the contents of the metadata.
Declaration
Objective-C
- (NSDictionary<NSString *, NSObject *> *_Nonnull)dictionaryRepresentation;
Return Value
A Dictionary that represents the contents of the metadata.
-
Determines if the current metadata represents a “file”.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isFile;
-
Determines if the current metadata represents a “folder”.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isFolder;
-
Declaration
Objective-C
- (nonnull instancetype)init;
-
Creates an instance of StorageMetadata from the contents of a dictionary.
Declaration
Objective-C
- (nonnull instancetype)initWithDictionary:
(NSDictionary<NSString *, NSObject *> *_Nonnull)dictionary;
Return Value
An instance of StorageMetadata that represents the contents of a dictionary.
-
Declaration
Objective-C
- (id _Nonnull)copy SWIFT_WARN_UNUSED_RESULT;
-
Declaration
Objective-C
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
-
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger hash
-
Declaration
Objective-C
@property (nonatomic, readonly, copy) NSString * _Nonnull description
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-10-10 UTC.
[null,null,["Last updated 2022-10-10 UTC."],[],[],null,["# FirebaseStorage Framework Reference\n\nFIRStorageMetadata\n==================\n\n\n @interface FIRStorageMetadata : NSObject\n\nClass which represents the metadata on an object in Firebase Storage. This metadata is\nreturned on successful operations, and can be used to retrieve download URLs, content types,\nand a Storage reference to the object in question. Full documentation can be found at the GCS\nObjects#resource docs. \nSee\n\u003chttps://cloud.google.com/storage/docs/json_api/v1/objects#resource\u003e\n- `\n ``\n ``\n `\n\n ### [bucket](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)bucket)\n\n `\n ` \n The name of the bucket containing this object. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nonnull bucket;\n\n- `\n ``\n ``\n `\n\n ### [cacheControl](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)cacheControl)\n\n `\n ` \n Cache-Control directive for the object data. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSString *_Nullable cacheControl;\n\n- `\n ``\n ``\n `\n\n ### [contentDisposition](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)contentDisposition)\n\n `\n ` \n Content-Disposition of the object data. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSString *_Nullable contentDisposition;\n\n- `\n ``\n ``\n `\n\n ### [contentEncoding](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)contentEncoding)\n\n `\n ` \n Content-Encoding of the object data. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSString *_Nullable contentEncoding;\n\n- `\n ``\n ``\n `\n\n ### [contentLanguage](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)contentLanguage)\n\n `\n ` \n Content-Language of the object data. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSString *_Nullable contentLanguage;\n\n- `\n ``\n ``\n `\n\n ### [contentType](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)contentType)\n\n `\n ` \n Content-Type of the object data. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSString *_Nullable contentType;\n\n- `\n ``\n ``\n `\n\n ### [md5Hash](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)md5Hash)\n\n `\n ` \n MD5 hash of the data; encoded using base64. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nullable md5Hash;\n\n- `\n ``\n ``\n `\n\n ### [generation](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)generation)\n\n `\n ` \n The content generation of this object. Used for object versioning. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) int64_t generation;\n\n- `\n ``\n ``\n `\n\n ### [customMetadata](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)customMetadata)\n\n `\n ` \n User-provided metadata, in key/value pairs. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSDictionary\u003cNSString *, NSString *\u003e *_Nullable customMetadata;\n\n- `\n ``\n ``\n `\n\n ### [metageneration](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)metageneration)\n\n `\n ` \n The version of the metadata for this object at this generation. Used\n for preconditions and for detecting changes in metadata. A metageneration number is only\n meaningful in the context of a particular generation of a particular object. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) int64_t metageneration;\n\n- `\n ``\n ``\n `\n\n ### [name](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)name)\n\n `\n ` \n The name of this object, in gs://bucket/path/to/object.txt, this is object.txt. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nullable name;\n\n- `\n ``\n ``\n `\n\n ### [path](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)path)\n\n `\n ` \n The full path of this object, in gs://bucket/path/to/object.txt, this is path/to/object.txt. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nullable path;\n\n- `\n ``\n ``\n `\n\n ### [size](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)size)\n\n `\n ` \n Content-Length of the data in bytes. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) int64_t size;\n\n- `\n ``\n ``\n `\n\n ### [timeCreated](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)timeCreated)\n\n `\n ` \n The creation time of the object in RFC 3339 format. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSDate *_Nullable timeCreated;\n\n- `\n ``\n ``\n `\n\n ### [updated](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)updated)\n\n `\n ` \n The modification time of the object metadata in RFC 3339 format. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSDate *_Nullable updated;\n\n- `\n ``\n ``\n `\n\n ### [storageReference](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)storageReference)\n\n `\n ` \n Never used API \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, strong, readonly) SWIFT_DEPRECATED ../Classes/FIRStorageReference.html *storageReference;\n\n- `\n ``\n ``\n `\n\n ### [-dictionaryRepresentation](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(im)dictionaryRepresentation)\n\n `\n ` \n Creates a Dictionary from the contents of the metadata. \n\n #### Declaration\n\n Objective-C \n\n - (NSDictionary\u003cNSString *, NSObject *\u003e *_Nonnull)dictionaryRepresentation;\n\n #### Return Value\n\n A Dictionary that represents the contents of the metadata.\n- `\n ``\n ``\n `\n\n ### [isFile](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)isFile)\n\n `\n ` \n Determines if the current metadata represents a \"file\". \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) BOOL isFile;\n\n- `\n ``\n ``\n `\n\n ### [isFolder](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)isFolder)\n\n `\n ` \n Determines if the current metadata represents a \"folder\". \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) BOOL isFolder;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(im)init)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;\n\n- `\n ``\n ``\n `\n\n ### [-initWithDictionary:](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(im)initWithDictionary:)\n\n `\n ` \n Creates an instance of StorageMetadata from the contents of a dictionary. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithDictionary:\n (NSDictionary\u003cNSString *, NSObject *\u003e *_Nonnull)dictionary;\n\n #### Return Value\n\n An instance of StorageMetadata that represents the contents of a dictionary.\n- `\n ``\n ``\n `\n\n ### [-copy](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(im)copy)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (id _Nonnull)copy SWIFT_WARN_UNUSED_RESULT;\n\n- `\n ``\n ``\n `\n\n ### [-isEqual:](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(im)isEqual:)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;\n\n- `\n ``\n ``\n `\n\n ### [hash](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)hash)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) NSUInteger hash\n\n- `\n ``\n ``\n `\n\n ### [description](#/c:@M@FirebaseStorage@objc(cs)FIRStorageMetadata(py)description)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly, copy) NSString * _Nonnull description"]]