mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
21 lines
600 B
Swift
21 lines
600 B
Swift
// Copyright (c) 2021 Timofey Solomko
|
|
// Licensed under MIT License
|
|
//
|
|
// See LICENSE for license information
|
|
|
|
import Foundation
|
|
|
|
/// A type that represents a container with files, directories and/or other data.
|
|
public protocol Container {
|
|
|
|
/// A type that represents an entry from this container.
|
|
associatedtype Entry: ContainerEntry
|
|
|
|
/// Retrieve all container entries with their data.
|
|
static func open(container: Data) throws -> [Entry]
|
|
|
|
/// Retrieve information about all container entries (without their data).
|
|
static func info(container: Data) throws -> [Entry.Info]
|
|
|
|
}
|