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