Table of Contents

Class ArchiveCreationRouter

Namespace
Archiver.Core.Services
Assembly
Archiver.Core.dll

Routes archive creation to IArchiveService (ZIP) or ITarService (tar-family) based on ArchiveOptions.Format. Unlike IExtractionRouter, this needs no per-path format detection — creation format is a single explicit choice for the whole operation.

public sealed class ArchiveCreationRouter : IArchiveCreationRouter
Inheritance
ArchiveCreationRouter
Implements
Inherited Members

Constructors

ArchiveCreationRouter(IArchiveService, ITarService, GroupPolicyOptions)

Routes archive creation to IArchiveService (ZIP) or ITarService (tar-family) based on ArchiveOptions.Format. Unlike IExtractionRouter, this needs no per-path format detection — creation format is a single explicit choice for the whole operation.

public ArchiveCreationRouter(IArchiveService archiveService, ITarService tarService, GroupPolicyOptions groupPolicyOptions)

Parameters

archiveService IArchiveService
tarService ITarService
groupPolicyOptions GroupPolicyOptions

Methods

ArchiveAsync(ArchiveOptions, IProgress<ProgressReport>?, CancellationToken)

Creates an archive in the format given by options.Format. Never throws except OperationCanceledException on cancellation (T-F260).

public Task<ArchiveResult> ArchiveAsync(ArchiveOptions options, IProgress<ProgressReport>? progress = null, CancellationToken cancellationToken = default)

Parameters

options ArchiveOptions
progress IProgress<ProgressReport>
cancellationToken CancellationToken

Returns

Task<ArchiveResult>