ערוך

שתף באמצעות


TarEntry.DataStream Property

Definition

Gets or sets the data section of this entry. If the EntryType does not support containing data, then returns null.

public:
 property System::IO::Stream ^ DataStream { System::IO::Stream ^ get(); void set(System::IO::Stream ^ value); };
public System.IO.Stream? DataStream { get; set; }
member this.DataStream : System.IO.Stream with get, set
Public Property DataStream As Stream

Property Value

Gets a stream that represents the data section of this entry.

Sets a new stream that represents the data section, if it makes sense for the EntryType to contain data. If a stream already exists, the old stream is disposed before substituting it with the new stream. Setting a null stream is allowed.

Exceptions

Setting a data section is not supported because the EntryType is not RegularFile (or V7RegularFile for an archive of V7 format).

The stream does not support reading.

An I/O problem occurred.

Remarks

If you write data to this data stream, make sure to rewind it to the desired start position before writing this entry into an archive using WriteEntry(TarEntry).

Applies to