7 writes to _dataStream
System.Formats.Tar (7)
System\Formats\Tar\TarEntry.cs (1)
280
_header.
_dataStream
= value;
System\Formats\Tar\TarHeader.cs (1)
112
_dataStream
= other._dataStream;
System\Formats\Tar\TarHeader.Read.cs (2)
216
_dataStream
= GetDataStream(archiveStream, copyData);
278
_dataStream
= await GetDataStreamAsync(archiveStream, copyData, _size, cancellationToken).ConfigureAwait(false);
System\Formats\Tar\TarHeader.Write.cs (2)
442
_dataStream
= new MemoryStream(Encoding.UTF8.GetBytes(longText))
480
_dataStream
= GenerateExtendedAttributesDataStream(extendedAttributes);
System\Formats\Tar\TarWriter.Unix.cs (1)
100
entry._header.
_dataStream
= new FileStream(fullPath, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, fileOptions);
73 references to _dataStream
System.Formats.Tar (73)
System\Formats\Tar\TarEntry.cs (4)
116
public long Length => _header.
_dataStream
!= null ? _header.
_dataStream
.Length : _header._size;
255
get => _header.
_dataStream
;
278
_header.
_dataStream
?.Dispose();
System\Formats\Tar\TarHeader.cs (1)
112
_dataStream = other.
_dataStream
;
System\Formats\Tar\TarHeader.Read.cs (4)
217
if (
_dataStream
is SeekableSubReadStream)
221
else if (
_dataStream
is SubReadStream)
279
if (
_dataStream
is SeekableSubReadStream)
283
else if (
_dataStream
is SubReadStream)
System\Formats\Tar\TarHeader.Write.cs (55)
36
Debug.Assert(
_dataStream
== null ||
_dataStream
.CanSeek);
42
if (
_dataStream
!= null)
44
WriteData(archiveStream,
_dataStream
);
52
Debug.Assert(
_dataStream
== null ||
_dataStream
.CanSeek);
58
if (
_dataStream
!= null)
60
await WriteDataAsync(archiveStream,
_dataStream
, cancellationToken).ConfigureAwait(false);
69
Debug.Assert(
_dataStream
!= null);
70
Debug.Assert(!
_dataStream
.CanSeek);
91
_dataStream
.CopyTo(destinationStream); // The data gets copied from the current position
121
Debug.Assert(
_dataStream
!= null);
122
Debug.Assert(!
_dataStream
.CanSeek);
143
await
_dataStream
.CopyToAsync(destinationStream, cancellationToken).ConfigureAwait(false); // The data gets copied from the current position
219
Debug.Assert(archiveStream.CanSeek ||
_dataStream
== null ||
_dataStream
.CanSeek);
221
if (archiveStream.CanSeek &&
_dataStream
is { CanSeek: false })
233
Debug.Assert(archiveStream.CanSeek ||
_dataStream
== null ||
_dataStream
.CanSeek);
235
if (archiveStream.CanSeek &&
_dataStream
is { CanSeek: false })
246
Debug.Assert(archiveStream.CanSeek ||
_dataStream
== null ||
_dataStream
.CanSeek);
248
if (archiveStream.CanSeek &&
_dataStream
is { CanSeek: false })
260
Debug.Assert(archiveStream.CanSeek ||
_dataStream
== null ||
_dataStream
.CanSeek);
262
if (archiveStream.CanSeek &&
_dataStream
is { CanSeek: false })
275
Debug.Assert(archiveStream.CanSeek ||
_dataStream
== null ||
_dataStream
.CanSeek);
281
if (archiveStream.CanSeek &&
_dataStream
is { CanSeek: false })
318
Debug.Assert(archiveStream.CanSeek ||
_dataStream
== null ||
_dataStream
.CanSeek);
325
if (archiveStream.CanSeek &&
_dataStream
is { CanSeek: false })
362
Debug.Assert(archiveStream.CanSeek ||
_dataStream
== null ||
_dataStream
.CanSeek);
368
Debug.Assert(longLinkHeader.
_dataStream
!= null && longLinkHeader.
_dataStream
.CanSeek); // We generate the long metadata data stream, should always be seekable
377
Debug.Assert(longPathHeader.
_dataStream
!= null && longPathHeader.
_dataStream
.CanSeek); // We generate the long metadata data stream, should always be seekable
383
if (archiveStream.CanSeek &&
_dataStream
is { CanSeek: false })
397
Debug.Assert(archiveStream.CanSeek ||
_dataStream
== null ||
_dataStream
.CanSeek);
404
Debug.Assert(longLinkHeader.
_dataStream
!= null && longLinkHeader.
_dataStream
.CanSeek); // We generate the long metadata data stream, should always be seekable
413
Debug.Assert(longPathHeader.
_dataStream
!= null && longPathHeader.
_dataStream
.CanSeek); // We generate the long metadata data stream, should always be seekable
419
if (archiveStream.CanSeek &&
_dataStream
is { CanSeek: false })
462
Debug.Assert(
_dataStream
== null || (extendedAttributes.Count > 0 &&
_dataStream
.CanSeek)); // We generate the extended attributes data stream, should always be seekable
471
Debug.Assert(
_dataStream
== null || (extendedAttributes.Count > 0 &&
_dataStream
.CanSeek)); // We generate the extended attributes data stream, should always be seekable
632
if (
_dataStream
!= null && _size >= 0)
668
if (
_dataStream
== null)
672
Debug.Assert(
_dataStream
.CanSeek);
674
long length =
_dataStream
.Length;
675
long position =
_dataStream
.Position;
System\Formats\Tar\TarReader.cs (3)
219
if (_previouslyReadEntry._header.
_dataStream
is not SubReadStream dataStream)
261
if (_previouslyReadEntry._header.
_dataStream
is not SubReadStream dataStream)
622
if (entry._header.
_dataStream
is SubReadStream dataStream)
System\Formats\Tar\TarWriter.cs (5)
169
entry._header.
_dataStream
?.Dispose();
180
if (entry._header.
_dataStream
!= null)
182
await entry._header.
_dataStream
.DisposeAsync().ConfigureAwait(false);
381
if (!_archiveStream.CanSeek && entry._header.
_dataStream
!= null && !entry._header.
_dataStream
.CanSeek)
System\Formats\Tar\TarWriter.Unix.cs (1)
99
Debug.Assert(entry._header.
_dataStream
== null);