7 instantiations of TarHeader
System.Formats.Tar (7)
System\Formats\Tar\TarEntry.cs (2)
49_header = new TarHeader(format, entryName, TarHelpers.GetDefaultMode(entryType), DateTimeOffset.UtcNow, entryType); 66_header = new TarHeader(format, compatibleEntryType, other._header);
System\Formats\Tar\TarHeader.Read.cs (1)
388TarHeader header = new(initialFormat,
System\Formats\Tar\TarHeader.Write.cs (3)
282TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 326TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 466return new(TarEntryFormat.Gnu)
System\Formats\Tar\TarReader.cs (1)
468finalHeader = new(TarEntryFormat.Gnu);
65 references to TarHeader
System.Formats.Tar (65)
System\Formats\Tar\GnuTarEntry.cs (1)
13internal GnuTarEntry(TarHeader header, TarReader readerOfOrigin)
System\Formats\Tar\PaxGlobalExtendedAttributesTarEntry.cs (1)
17internal PaxGlobalExtendedAttributesTarEntry(TarHeader header, TarReader readerOfOrigin)
System\Formats\Tar\PaxTarEntry.cs (7)
18internal PaxTarEntry(TarHeader header, TarReader readerOfOrigin) 130_header.ExtendedAttributes[TarHeader.PaxEaATime] = TarHelpers.GetTimestampStringFromDateTimeOffset(gnuOther.AccessTime); 134_header.ExtendedAttributes[TarHeader.PaxEaCTime] = TarHelpers.GetTimestampStringFromDateTimeOffset(gnuOther.ChangeTime); 171bool containsATime = _header.ExtendedAttributes.ContainsKey(TarHeader.PaxEaATime); 172bool containsCTime = _header.ExtendedAttributes.ContainsKey(TarHeader.PaxEaCTime); 180_header.ExtendedAttributes[TarHeader.PaxEaATime] = secondsFromEpochString; 185_header.ExtendedAttributes[TarHeader.PaxEaCTime] = secondsFromEpochString;
System\Formats\Tar\PosixTarEntry.cs (1)
16internal PosixTarEntry(TarHeader header, TarReader readerOfOrigin, TarEntryFormat format)
System\Formats\Tar\TarEntry.cs (2)
18internal TarHeader _header; 27internal TarEntry(TarHeader header, TarReader readerOfOrigin, TarEntryFormat format)
System\Formats\Tar\TarHeader.cs (2)
104internal TarHeader(TarEntryFormat format, TarEntryType typeFlag, TarHeader other) 157private static void SetDataOffset(TarHeader header, Stream archiveStream) =>
System\Formats\Tar\TarHeader.Read.cs (8)
23internal static TarHeader? TryGetNextHeader(Stream archiveStream, bool copyData, TarEntryFormat initialFormat, bool processDataBlock) 30TarHeader? header = TryReadAttributes(initialFormat, buffer, archiveStream); 42internal static async ValueTask<TarHeader?> TryGetNextHeaderAsync(Stream archiveStream, bool copyData, TarEntryFormat initialFormat, bool processDataBlock, CancellationToken cancellationToken) 52TarHeader? header = TryReadAttributes(initialFormat, buffer.Span, archiveStream); 63private static TarHeader? TryReadAttributes(TarEntryFormat initialFormat, ReadOnlySpan<byte> buffer, Stream archiveStream) 66TarHeader? header = TryReadCommonAttributes(buffer, initialFormat); 364private static TarHeader? TryReadCommonAttributes(ReadOnlySpan<byte> buffer, TarEntryFormat initialFormat) 388TarHeader header = new(initialFormat,
System\Formats\Tar\TarHeader.Write.cs (9)
282TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 326TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 377TarHeader longLinkHeader = GetGnuLongLinkMetadataHeader(); 386TarHeader longPathHeader = GetGnuLongPathMetadataHeader(); 413TarHeader longLinkHeader = GetGnuLongLinkMetadataHeader(); 422TarHeader longPathHeader = GetGnuLongPathMetadataHeader(); 448private TarHeader GetGnuLongLinkMetadataHeader() 455private TarHeader GetGnuLongPathMetadataHeader() 462private static TarHeader GetGnuLongMetadataHeader(MemoryStream dataStream, TarEntryType entryType)
System\Formats\Tar\TarReader.cs (32)
133TarHeader? header = TryGetNextEntryHeader(copyData); 286TarHeader? header = await TryGetNextEntryHeaderAsync(copyData, cancellationToken).ConfigureAwait(false); 317private TarHeader? TryGetNextEntryHeader(bool copyData) 321TarHeader? header = TarHeader.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Unknown, processDataBlock: true); 333if (!TryProcessExtendedAttributesHeader(header, copyData, out TarHeader? mainHeader)) 342if (!TryProcessGnuMetadataHeader(header, copyData, out TarHeader mainHeader)) 357private async ValueTask<TarHeader?> TryGetNextEntryHeaderAsync(bool copyData, CancellationToken cancellationToken) 363TarHeader? header = await TarHeader.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Unknown, processDataBlock: true, cancellationToken).ConfigureAwait(false); 374TarHeader? mainHeader = await TryProcessExtendedAttributesHeaderAsync(header, copyData, cancellationToken).ConfigureAwait(false); 384TarHeader? mainHeader = await TryProcessGnuMetadataHeaderAsync(header, copyData, cancellationToken).ConfigureAwait(false); 397private bool TryProcessExtendedAttributesHeader(TarHeader extendedAttributesHeader, bool copyData, [NotNullWhen(returnValue: true)] out TarHeader? actualHeader) 401actualHeader = TarHeader.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Pax, processDataBlock: false); 428private async ValueTask<TarHeader?> TryProcessExtendedAttributesHeaderAsync(TarHeader extendedAttributesHeader, bool copyData, CancellationToken cancellationToken) 434TarHeader? actualHeader = await TarHeader.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Pax, processDataBlock: false, cancellationToken).ConfigureAwait(false); 466private bool TryProcessGnuMetadataHeader(TarHeader header, bool copyData, out TarHeader finalHeader) 470TarHeader? secondHeader = TarHeader.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true); 488TarHeader? thirdHeader = TarHeader.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true); 542private async ValueTask<TarHeader?> TryProcessGnuMetadataHeaderAsync(TarHeader header, bool copyData, CancellationToken cancellationToken) 547TarHeader? secondHeader = await TarHeader.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true, cancellationToken).ConfigureAwait(false); 559TarHeader finalHeader; 566TarHeader? thirdHeader = await TarHeader.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true, cancellationToken).ConfigureAwait(false);
System\Formats\Tar\UstarTarEntry.cs (1)
12internal UstarTarEntry(TarHeader header, TarReader readerOfOrigin)
System\Formats\Tar\V7TarEntry.cs (1)
12internal V7TarEntry(TarHeader header, TarReader readerOfOrigin)