Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ZipArchiveEditor

OfficeIMO.Archives

Namespace
OfficeIMO.Archives
Assembly
OfficeIMO.Archives
Source revision
273d35d5ba8a with working tree changes
Modifiers
static

Edits one ZIP file by building a complete replacement beside it and committing it atomically.

Inheritance

  • object
  • ZipArchiveEditor

Methods

public static void Update(string archivePath, Action<ZipArchiveEdits> configure, ZipArchiveWriterOptions? options = null, ArchiveInspectionOptions? inputOptions = null, CancellationToken cancellationToken = default) #

Configures edits against the exact central-directory inventory being updated. Retained members use supported ZIP flags and stored, Deflate, or unencrypted Zstandard compression. Stored and Deflate members may use ZipCrypto or WinZip AES. Unchanged and renamed members retain their compressed payload and descriptor bytes. Additions and replacements use ZipArchiveWriter. Archives with a central-directory digital signature require a separate signing workflow. The editor preserves the declared archive comment and refuses to rewrite ZIPs with bytes after it. Cancellation before publication leaves the original file available.

Parameters

archivePath string required
configure System.Action<OfficeIMO.Archives.ZipArchiveEdits> required
options OfficeIMO.Archives.ZipArchiveWriterOptions? = null optional
inputOptions OfficeIMO.Archives.ArchiveInspectionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional