StorageMetadata

class StorageMetadata : NSObject, NSCopying

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 FIRStorage 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

    Swift

    var bucket: String { get }
  • Cache-Control directive for the object data.

    Declaration

    Swift

    var cacheControl: String? { get set }
  • Content-Disposition of the object data.

    Declaration

    Swift

    var contentDisposition: String? { get set }
  • Content-Encoding of the object data.

    Declaration

    Swift

    var contentEncoding: String? { get set }
  • Content-Language of the object data.

    Declaration

    Swift

    var contentLanguage: String? { get set }
  • Content-Type of the object data.

    Declaration

    Swift

    var contentType: String? { get set }
  • MD5 hash of the data; encoded using base64.

    Declaration

    Swift

    var md5Hash: String? { get }
  • The content generation of this object. Used for object versioning.

    Declaration

    Swift

    var generation: Int64 { get }
  • User-provided metadata, in key/value pairs.

    Declaration

    Swift

    var customMetadata: [String : String]? { get set }
  • 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

    Swift

    var metageneration: Int64 { get }
  • The name of this object, in gs://bucket/path/to/object.txt, this is object.txt.

    Declaration

    Swift

    var name: String? { get }
  • The full path of this object, in gs://bucket/path/to/object.txt, this is path/to/object.txt.

    Declaration

    Swift

    var path: String? { get }
  • Content-Length of the data in bytes.

    Declaration

    Swift

    var size: Int64 { get }
  • The creation time of the object in RFC 3339 format.

    Declaration

    Swift

    var timeCreated: Date? { get }
  • The modification time of the object metadata in RFC 3339 format.

    Declaration

    Swift

    var updated: Date? { get }
  • A reference to the object in Firebase Storage.

    Declaration

    Swift

    var storageReference: FIRStorageReference? { get }
  • Creates an instanece of FIRStorageMetadata from the contents of a dictionary.

    Declaration

    Swift

    init?(dictionary: [String : Any])

    Return Value

    An instance of FIRStorageMetadata that represents the contents of a dictionary.

  • Creates an NSDictionary from the contents of the metadata.

    Declaration

    Swift

    func dictionaryRepresentation() -> [String : Any]

    Return Value

    An NSDictionary that represents the contents of the metadata.

  • Determines if the current metadata represents a file.

    Declaration

    Swift

    var isFile: Bool { get }
  • Determines if the current metadata represents a folder.

    Declaration

    Swift

    var isFolder: Bool { get }