ZipEntry

public class ZipEntry: ContainerEntry

Represents either a file or directory entry inside ZIP archive.

  • Name of the file or directory.

    Declaration

    Swift

    public var name: String
  • Comment associated with the entry.

    Declaration

    Swift

    public var comment: String?
  • File or directory attributes related to the file system of archive’s creator.

    Declaration

    Swift

    public var attributes: UInt32
  • Undocumented

    Declaration

    Swift

    public class ZipEntry: ContainerEntry
  • True, if an entry is likely to be a directory. Particularly, it is true if size of data is 0 and last character of entry’s name is ‘/’.

    Declaration

    Swift

    public var isDirectory: Bool
  • Returns data associated with this entry.

    Note

    Returned Data object with the size of 0 can either indicate that the entry is an empty file or it is a directory.

    Throws

    ZipError or any other error associated with compression type, depending on the type of inconsistency in data. An error can indicate that the container is damaged.

    Declaration

    Swift

    public func data() throws -> Data