ZipEntry
public class ZipEntry: ContainerEntry
Represents either a file or directory entry in ZIP container.
-
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 the container’s creator.
Declaration
Swift
public var attributes: UInt32 -
Size of the data associated with the entry.
Declaration
Swift
public var size: Int -
True, if entry is a directory. For MS-DOS and UNIX-like container creator’s OS, the result is based on ‘external file attributes’. Otherwise, it is true if size of data is 0 AND last character of entry’s name is ‘/’.
Declaration
Swift
public var isDirectory: Bool -
True, if entry is a symbolic link.
Declaration
Swift
public let isLink: Bool -
Path to a linked file for symbolic link entry.
Declaration
Swift
public lazy var linkPath: String? = -
True if entry is likely to be text or ASCII file.
Declaration
Swift
public var isTextFile: Bool -
Provides a dictionary with various attributes of the entry.
FileAttributeKeyvalues are used as dictionary keys.Possible attributes:
FileAttributeKey.modificationDateFileAttributeKey.sizeFileAttributeKey.type, only if origin OS was UNIX- or DOS-like.FileAttributeKey.posixPermissions, only if origin OS was UNIX-like.FileAttributeKey.appendOnly, only if origin OS was DOS-like.
Declaration
Swift
public let entryAttributes: [FileAttributeKey: Any] -
Returns data associated with this entry.
Throws
ZipErroror any other error associated with compression type, depending on the type of the problem. An error can indicate that container is damaged.Declaration
Swift
public func data() throws -> Data
View on GitHub
ZipEntry Class Reference