Structureswift-package-manager 6.0.3Basics
TarArchiver
An Archiver
that handles Tar archives using the command-line tar
tool.
struct TarArchiver
An Archiver
that handles Tar archives using the command-line tar
tool.
struct TarArchiver
import Basics
protocol Archiver : Sendable
The Archiver
protocol abstracts away the different operations surrounding archives.
protocol Sendable
init(fileSystem: FileSystem, cancellator: Cancellator? = .none)
Creates a TarArchiver
.
let supportedExtensions: Set<String>
func cancel(deadline: DispatchTime) throws
func compress(directory: AbsolutePath, to destinationPath: AbsolutePath, completion: @escaping (Result<Void, Error>) -> Void)
func extract(from archivePath: AbsolutePath, to destinationPath: AbsolutePath, completion: @escaping (Result<Void, Error>) -> Void)
func validate(path: AbsolutePath, completion: @escaping (Result<Bool, Error>) -> Void)
func compress(directory: AbsolutePath, to destinationPath: AbsolutePath) async throws
Asynchronously compresses the contents of a directory to a destination archive.
func extract(from archivePath: AbsolutePath, to destinationPath: AbsolutePath) async throws
Asynchronously extracts the contents of an archive to a destination folder.
func isFileSupported(_ lastPathComponent: String) -> Bool
func validate(path: AbsolutePath) async throws -> Bool
Asynchronously validates if a file is an archive.