# CpioArchiveWriter

Writes deterministic newc, crc or odc cpio archives of portable regular files and directories.

Class 

`OfficeIMO.Archives`

**Namespace**

`OfficeIMO.Archives`

**Assembly**

`OfficeIMO.Archives`

**Source revision**

`12511d2fa560` with working tree changes

**Source**

[CpioArchiveWriter.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Archives/CpioArchiveWriter.cs#L31)

**Modifiers**

static

Writes deterministic newc, crc or odc cpio archives of portable regular files and directories.

## Inheritance

- object
- CpioArchiveWriter

## Remarks

Members are stored in input order with fixed numeric UID and GID. There are no links or special files.

Filter members 

Show inherited

## Methods

Create 2 overloads

`public static void Create(Stream destination, IEnumerable<ArchiveWriteEntry> entries, CpioArchiveWriterOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-create-io-stream-collections-generic-ienumerable-officeimo-archives-archivewriteentry-officeimo-archives-cpioarchivewriteroptions-threading-cancellationtoken)

[CpioArchiveWriter.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Archives/CpioArchiveWriter.cs#L31)

Writes to the current position of a writable stream and leaves it open. The stream need not seek. Member preparation finishes before the first destination write. An output I/O failure can leave a partial result.

Parameters

**destination System.IO.Stream required**

**entries System.Collections.Generic.IEnumerable<OfficeIMO.Archives.ArchiveWriteEntry> required**

**options OfficeIMO.Archives.CpioArchiveWriterOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

`public static void Create(string destinationPath, IEnumerable<ArchiveWriteEntry> entries, CpioArchiveWriterOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-create-string-collections-generic-ienumerable-officeimo-archives-archivewriteentry-officeimo-archives-cpioarchivewriteroptions-threading-cancellationtoken)

[CpioArchiveWriter.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Archives/CpioArchiveWriter.cs#L36)

Atomically creates a new cpio file. An existing file is not overwritten.

Parameters

**destinationPath string required**

**entries System.Collections.Generic.IEnumerable<OfficeIMO.Archives.ArchiveWriteEntry> required**

**options OfficeIMO.Archives.CpioArchiveWriterOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:1DB15BB622CEC803FD2EFF6B0D2D3EADD2B7DFAB09C98D441702CDAD992B248A -->
