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)
386
TarHeader header =
new
(initialFormat,
System\Formats\Tar\TarHeader.Write.cs (3)
279
TarHeader extendedAttributesHeader =
new
(TarEntryFormat.Pax);
323
TarHeader extendedAttributesHeader =
new
(TarEntryFormat.Pax);
434
return
new
(TarEntryFormat.Gnu)
System\Formats\Tar\TarReader.cs (1)
468
finalHeader =
new
(TarEntryFormat.Gnu);
65 references to TarHeader
System.Formats.Tar (65)
System\Formats\Tar\GnuTarEntry.cs (3)
13
internal GnuTarEntry(
TarHeader
header, TarReader readerOfOrigin)
62
changedATime = TarHelpers.TryGetDateTimeOffsetFromTimestampString(paxOther._header.ExtendedAttributes,
TarHeader
.PaxEaATime, out DateTimeOffset aTime);
68
changedCTime = TarHelpers.TryGetDateTimeOffsetFromTimestampString(paxOther._header.ExtendedAttributes,
TarHeader
.PaxEaCTime, out DateTimeOffset cTime);
System\Formats\Tar\PaxGlobalExtendedAttributesTarEntry.cs (1)
17
internal PaxGlobalExtendedAttributesTarEntry(
TarHeader
header, TarReader readerOfOrigin)
System\Formats\Tar\PaxTarEntry.cs (7)
18
internal PaxTarEntry(
TarHeader
header, TarReader readerOfOrigin)
125
_header.ExtendedAttributes[
TarHeader
.PaxEaATime] = TarHelpers.GetTimestampStringFromDateTimeOffset(gnuOther.AccessTime);
126
_header.ExtendedAttributes[
TarHeader
.PaxEaCTime] = TarHelpers.GetTimestampStringFromDateTimeOffset(gnuOther.ChangeTime);
162
bool containsATime = _header.ExtendedAttributes.ContainsKey(
TarHeader
.PaxEaATime);
163
bool containsCTime = _header.ExtendedAttributes.ContainsKey(
TarHeader
.PaxEaCTime);
171
_header.ExtendedAttributes[
TarHeader
.PaxEaATime] = secondsFromEpochString;
176
_header.ExtendedAttributes[
TarHeader
.PaxEaCTime] = secondsFromEpochString;
System\Formats\Tar\PosixTarEntry.cs (1)
16
internal PosixTarEntry(
TarHeader
header, TarReader readerOfOrigin, TarEntryFormat format)
System\Formats\Tar\TarEntry.cs (2)
18
internal
TarHeader
_header;
27
internal TarEntry(
TarHeader
header, TarReader readerOfOrigin, TarEntryFormat format)
System\Formats\Tar\TarHeader.cs (2)
104
internal TarHeader(TarEntryFormat format, TarEntryType typeFlag,
TarHeader
other)
157
private static void SetDataOffset(
TarHeader
header, Stream archiveStream) =>
System\Formats\Tar\TarHeader.Read.cs (8)
21
internal static
TarHeader
? TryGetNextHeader(Stream archiveStream, bool copyData, TarEntryFormat initialFormat, bool processDataBlock)
28
TarHeader
? header = TryReadAttributes(initialFormat, buffer, archiveStream);
40
internal static async ValueTask<
TarHeader
?> TryGetNextHeaderAsync(Stream archiveStream, bool copyData, TarEntryFormat initialFormat, bool processDataBlock, CancellationToken cancellationToken)
50
TarHeader
? header = TryReadAttributes(initialFormat, buffer.Span, archiveStream);
61
private static
TarHeader
? TryReadAttributes(TarEntryFormat initialFormat, ReadOnlySpan<byte> buffer, Stream archiveStream)
64
TarHeader
? header = TryReadCommonAttributes(buffer, initialFormat);
362
private static
TarHeader
? TryReadCommonAttributes(ReadOnlySpan<byte> buffer, TarEntryFormat initialFormat)
386
TarHeader
header = new(initialFormat,
System\Formats\Tar\TarHeader.Write.cs (7)
279
TarHeader
extendedAttributesHeader = new(TarEntryFormat.Pax);
323
TarHeader
extendedAttributesHeader = new(TarEntryFormat.Pax);
367
TarHeader
longLinkHeader = GetGnuLongMetadataHeader(TarEntryType.LongLink, _linkName);
376
TarHeader
longPathHeader = GetGnuLongMetadataHeader(TarEntryType.LongPath, _name);
403
TarHeader
longLinkHeader = GetGnuLongMetadataHeader(TarEntryType.LongLink, _linkName);
412
TarHeader
longPathHeader = GetGnuLongMetadataHeader(TarEntryType.LongPath, _name);
430
private static
TarHeader
GetGnuLongMetadataHeader(TarEntryType entryType, string longText)
System\Formats\Tar\TarReader.cs (32)
133
TarHeader
? header = TryGetNextEntryHeader(copyData);
286
TarHeader
? header = await TryGetNextEntryHeaderAsync(copyData, cancellationToken).ConfigureAwait(false);
317
private
TarHeader
? TryGetNextEntryHeader(bool copyData)
321
TarHeader
? header =
TarHeader
.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Unknown, processDataBlock: true);
333
if (!TryProcessExtendedAttributesHeader(header, copyData, out
TarHeader
? mainHeader))
342
if (!TryProcessGnuMetadataHeader(header, copyData, out
TarHeader
mainHeader))
357
private async ValueTask<
TarHeader
?> TryGetNextEntryHeaderAsync(bool copyData, CancellationToken cancellationToken)
363
TarHeader
? header = await
TarHeader
.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Unknown, processDataBlock: true, cancellationToken).ConfigureAwait(false);
374
TarHeader
? mainHeader = await TryProcessExtendedAttributesHeaderAsync(header, copyData, cancellationToken).ConfigureAwait(false);
384
TarHeader
? mainHeader = await TryProcessGnuMetadataHeaderAsync(header, copyData, cancellationToken).ConfigureAwait(false);
397
private bool TryProcessExtendedAttributesHeader(
TarHeader
extendedAttributesHeader, bool copyData, [NotNullWhen(returnValue: true)] out
TarHeader
? actualHeader)
401
actualHeader =
TarHeader
.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Pax, processDataBlock: false);
428
private async ValueTask<
TarHeader
?> TryProcessExtendedAttributesHeaderAsync(
TarHeader
extendedAttributesHeader, bool copyData, CancellationToken cancellationToken)
434
TarHeader
? actualHeader = await
TarHeader
.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Pax, processDataBlock: false, cancellationToken).ConfigureAwait(false);
466
private bool TryProcessGnuMetadataHeader(
TarHeader
header, bool copyData, out
TarHeader
finalHeader)
470
TarHeader
? secondHeader =
TarHeader
.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true);
488
TarHeader
? thirdHeader =
TarHeader
.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true);
542
private async ValueTask<
TarHeader
?> TryProcessGnuMetadataHeaderAsync(
TarHeader
header, bool copyData, CancellationToken cancellationToken)
547
TarHeader
? secondHeader = await
TarHeader
.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true, cancellationToken).ConfigureAwait(false);
559
TarHeader
finalHeader;
566
TarHeader
? thirdHeader = await
TarHeader
.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true, cancellationToken).ConfigureAwait(false);
System\Formats\Tar\UstarTarEntry.cs (1)
12
internal UstarTarEntry(
TarHeader
header, TarReader readerOfOrigin)
System\Formats\Tar\V7TarEntry.cs (1)
12
internal V7TarEntry(
TarHeader
header, TarReader readerOfOrigin)