ContainerEntry

public protocol ContainerEntry

A type that represents an entry from a container (file or directory) with attributes.

  • Retrieve name of the entry from the container.

    Declaration

    Swift

    var name: String
  • Retrieve size of the entry’s data from the container.

    Declaration

    Swift

    var size: Int
  • True, if entry is a directory.

    Declaration

    Swift

    var isDirectory: Bool
  • True, if entry is a symbolic link.

    Declaration

    Swift

    var isLink: Bool
  • Path to a linked file for symbolic link entry.

    Declaration

    Swift

    var linkPath: String?
  • Provides a dictionary with various attributes of the entry. FileAttributeKey values are used as dictionary keys.

    Note

    Will be renamed to attributes in 4.0.

    Declaration

    Swift

    var entryAttributes: [FileAttributeKey: Any]
  • Retrieve entry’s data from the container.

    Declaration

    Swift

    func data() throws -> Data