Rediger

Del via


TarWriter Constructors

Definition

Overloads

TarWriter(Stream)

Initializes a TarWriter instance that can write tar entries to the specified stream and closes the archiveStream upon disposal of this instance.

TarWriter(Stream, Boolean)

Initializes a TarWriter instance that can write tar entries to the specified stream and optionally leaves the stream open upon disposal of this instance. When using this constructor, the format of the resulting archive is Pax.

TarWriter(Stream, TarEntryFormat, Boolean)

Initializes a TarWriter instance that can write tar entries to the specified stream, optionally leaving the stream open upon disposal of this instance, and optionally specifying the format when writing entries using the WriteEntry(String, String) method.

TarWriter(Stream)

Source:
TarWriter.cs
Source:
TarWriter.cs
Source:
TarWriter.cs

Initializes a TarWriter instance that can write tar entries to the specified stream and closes the archiveStream upon disposal of this instance.

public:
 TarWriter(System::IO::Stream ^ archiveStream);
public TarWriter (System.IO.Stream archiveStream);
new System.Formats.Tar.TarWriter : System.IO.Stream -> System.Formats.Tar.TarWriter
Public Sub New (archiveStream As Stream)

Parameters

archiveStream
Stream

The stream to write to.

Exceptions

archiveStream is null.

archiveStream does not support writing.

Remarks

When using this constructor, Pax is used as the default format of the entries written to the archive using the WriteEntry(String, String) method.

Applies to

TarWriter(Stream, Boolean)

Source:
TarWriter.cs
Source:
TarWriter.cs
Source:
TarWriter.cs

Initializes a TarWriter instance that can write tar entries to the specified stream and optionally leaves the stream open upon disposal of this instance. When using this constructor, the format of the resulting archive is Pax.

public TarWriter (System.IO.Stream archiveStream, bool leaveOpen = false);
new System.Formats.Tar.TarWriter : System.IO.Stream * bool -> System.Formats.Tar.TarWriter
Public Sub New (archiveStream As Stream, Optional leaveOpen As Boolean = false)

Parameters

archiveStream
Stream

The stream to write to.

leaveOpen
Boolean

false to dispose the archiveStream when this instance is disposed; true to leave the stream open.

Exceptions

archiveStream is null.

archiveStream does not support writing.

Applies to

TarWriter(Stream, TarEntryFormat, Boolean)

Source:
TarWriter.Unix.cs
Source:
TarWriter.Unix.cs
Source:
TarWriter.Unix.cs

Initializes a TarWriter instance that can write tar entries to the specified stream, optionally leaving the stream open upon disposal of this instance, and optionally specifying the format when writing entries using the WriteEntry(String, String) method.

public TarWriter (System.IO.Stream archiveStream, System.Formats.Tar.TarEntryFormat format = System.Formats.Tar.TarEntryFormat.Pax, bool leaveOpen = false);
new System.Formats.Tar.TarWriter : System.IO.Stream * System.Formats.Tar.TarEntryFormat * bool -> System.Formats.Tar.TarWriter
Public Sub New (archiveStream As Stream, Optional format As TarEntryFormat = System.Formats.Tar.TarEntryFormat.Pax, Optional leaveOpen As Boolean = false)

Parameters

archiveStream
Stream

The stream to write to.

format
TarEntryFormat

The format to use when calling WriteEntry(String, String). The default value is Pax.

leaveOpen
Boolean

false to dispose the archiveStream when this instance is disposed; true to leave the stream open.

Exceptions

archiveStream is null.

archiveStream does not support writing.

format is either Unknown or not one of the other enum values.

Remarks

The recommended format is Pax for its flexibility.

Applies to