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)
386TarHeader header = new(initialFormat,
System\Formats\Tar\TarHeader.Write.cs (3)
279TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 323TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 434return 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 (3)
13internal GnuTarEntry(TarHeader header, TarReader readerOfOrigin) 62changedATime = TarHelpers.TryGetDateTimeOffsetFromTimestampString(paxOther._header.ExtendedAttributes, TarHeader.PaxEaATime, out DateTimeOffset aTime); 68changedCTime = TarHelpers.TryGetDateTimeOffsetFromTimestampString(paxOther._header.ExtendedAttributes, TarHeader.PaxEaCTime, out DateTimeOffset cTime);
System\Formats\Tar\PaxGlobalExtendedAttributesTarEntry.cs (1)
17internal PaxGlobalExtendedAttributesTarEntry(TarHeader header, TarReader readerOfOrigin)
System\Formats\Tar\PaxTarEntry.cs (7)
18internal PaxTarEntry(TarHeader header, TarReader readerOfOrigin) 125_header.ExtendedAttributes[TarHeader.PaxEaATime] = TarHelpers.GetTimestampStringFromDateTimeOffset(gnuOther.AccessTime); 126_header.ExtendedAttributes[TarHeader.PaxEaCTime] = TarHelpers.GetTimestampStringFromDateTimeOffset(gnuOther.ChangeTime); 162bool containsATime = _header.ExtendedAttributes.ContainsKey(TarHeader.PaxEaATime); 163bool containsCTime = _header.ExtendedAttributes.ContainsKey(TarHeader.PaxEaCTime); 171_header.ExtendedAttributes[TarHeader.PaxEaATime] = secondsFromEpochString; 176_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)
21internal static TarHeader? TryGetNextHeader(Stream archiveStream, bool copyData, TarEntryFormat initialFormat, bool processDataBlock) 28TarHeader? header = TryReadAttributes(initialFormat, buffer, archiveStream); 40internal static async ValueTask<TarHeader?> TryGetNextHeaderAsync(Stream archiveStream, bool copyData, TarEntryFormat initialFormat, bool processDataBlock, CancellationToken cancellationToken) 50TarHeader? header = TryReadAttributes(initialFormat, buffer.Span, archiveStream); 61private static TarHeader? TryReadAttributes(TarEntryFormat initialFormat, ReadOnlySpan<byte> buffer, Stream archiveStream) 64TarHeader? header = TryReadCommonAttributes(buffer, initialFormat); 362private static TarHeader? TryReadCommonAttributes(ReadOnlySpan<byte> buffer, TarEntryFormat initialFormat) 386TarHeader header = new(initialFormat,
System\Formats\Tar\TarHeader.Write.cs (7)
279TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 323TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 367TarHeader longLinkHeader = GetGnuLongMetadataHeader(TarEntryType.LongLink, _linkName); 376TarHeader longPathHeader = GetGnuLongMetadataHeader(TarEntryType.LongPath, _name); 403TarHeader longLinkHeader = GetGnuLongMetadataHeader(TarEntryType.LongLink, _linkName); 412TarHeader longPathHeader = GetGnuLongMetadataHeader(TarEntryType.LongPath, _name); 430private static TarHeader GetGnuLongMetadataHeader(TarEntryType entryType, string longText)
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)