241 references to TarEntryFormat
System.Formats.Tar (241)
System\Formats\Tar\GnuTarEntry.cs (14)
9/// <remarks>Even though the <see cref="TarEntryFormat.Gnu"/> format is not POSIX compatible, it implements and supports the Unix-specific fields that were defined in the POSIX IEEE P1003.1 standard from 1988: <c>devmajor</c>, <c>devminor</c>, <c>gname</c> and <c>uname</c>.</remarks> 14: base(header, readerOfOrigin, TarEntryFormat.Gnu) 24/// <para>When creating an instance of <see cref="GnuTarEntry"/> using this constructor, the <see cref="AccessTime"/> and <see cref="ChangeTime"/> properties are set to <see langword="default" />, which in the entry header <c>atime</c> and <c>ctime</c> fields is written as null bytes. This ensures compatibility with other tools that are unable to read the <c>atime</c> and <c>ctime</c> in <see cref="TarEntryFormat.Gnu"/> entries, as these two fields are not POSIX compatible because other formats expect the <c>prefix</c> field in the same header location where <see cref="TarEntryFormat.Gnu"/> writes <c>atime</c> and <c>ctime</c>.</para> 36: base(entryType, entryName, TarEntryFormat.Gnu, isGea: false) 46/// <para>When creating an instance of <see cref="GnuTarEntry"/> using this constructor, if <paramref name="other"/> is <see cref="TarEntryFormat.Gnu"/> or <see cref="TarEntryFormat.Pax"/>, then the <see cref="AccessTime"/> and <see cref="ChangeTime"/> properties are set to the same values set in <paramref name="other"/>. But if <paramref name="other"/> is of any other format, then <see cref="AccessTime"/> and <see cref="ChangeTime"/> are set to <see langword="default" />, which in the entry header <c>atime</c> and <c>ctime</c> fields is written as null bytes. This ensures compatibility with other tools that are unable to read the <c>atime</c> and <c>ctime</c> in <see cref="TarEntryFormat.Gnu"/> entries, as these two fields are not POSIX compatible because other formats expect the <c>prefix</c> field in the same header location where <see cref="TarEntryFormat.Gnu"/> writes <c>atime</c> and <c>ctime</c>.</para> 52: base(other, TarEntryFormat.Gnu) 77/// <para>Setting the value of this property to a value other than <see langword="default"/> may cause problems with other tools that read TAR files, because the <see cref="TarEntryFormat.Gnu"/> format writes the <c>atime</c> field where other formats would normally read and write the <c>prefix</c> field in the header. You should only set this property to something other than <see langword="default"/> if this entry will be read by tools that know how to correctly interpret the <c>atime</c> field of the <see cref="TarEntryFormat.Gnu"/> format.</para> 93/// <para>Setting the value of this property to a value other than <see langword="default"/> may cause problems with other tools that read TAR files, because the <see cref="TarEntryFormat.Gnu"/> format writes the <c>ctime</c> field where other formats would normally read and write the <c>prefix</c> field in the header. You should only set this property to something other than <see langword="default"/> if this entry will be read by tools that know how to correctly interpret the <c>ctime</c> field of the <see cref="TarEntryFormat.Gnu"/> format.</para>
System\Formats\Tar\PaxGlobalExtendedAttributesTarEntry.cs (2)
18: base(header, readerOfOrigin, TarEntryFormat.Pax) 28: base(TarEntryType.GlobalExtendedAttributes, nameof(PaxGlobalExtendedAttributesTarEntry), TarEntryFormat.Pax, isGea: true) // Name == name of type for lack of a better temporary name until the entry is written
System\Formats\Tar\PaxTarEntry.cs (6)
19: base(header, readerOfOrigin, TarEntryFormat.Pax) 53: base(entryType, entryName, TarEntryFormat.Pax, isGea: false) 92: base(entryType, entryName, TarEntryFormat.Pax, isGea: false) 113: base(other, TarEntryFormat.Pax) 115if (other._header._format is TarEntryFormat.Ustar or TarEntryFormat.Pax)
System\Formats\Tar\PosixTarEntry.cs (11)
9/// Abstract class that represents a tar entry from an archive of a format that is based on the POSIX IEEE P1003.1 standard from 1988. This includes the formats <see cref="TarEntryFormat.Ustar"/> (represented by the <see cref="UstarTarEntry"/> class), <see cref="TarEntryFormat.Pax"/> (represented by the <see cref="PaxTarEntry"/> class) and <see cref="TarEntryFormat.Gnu"/> (represented by the <see cref="GnuTarEntry"/> class). 12/// Even though the <see cref="TarEntryFormat.Gnu"/> format is not POSIX compatible, it implements and supports the Unix-specific fields that were defined in that POSIX standard.</remarks> 16internal PosixTarEntry(TarHeader header, TarReader readerOfOrigin, TarEntryFormat format) 22internal PosixTarEntry(TarEntryType entryType, string entryName, TarEntryFormat format, bool isGea) 32internal PosixTarEntry(TarEntry other, TarEntryFormat format) 53/// <exception cref="ArgumentOutOfRangeException">The value is negative, or larger than 2097151 when using <see cref="TarEntryFormat.V7"/> or <see cref="TarEntryFormat.Ustar"/>.</exception> 79/// <exception cref="ArgumentOutOfRangeException">The value is negative, or larger than 2097151 when using <see cref="TarEntryFormat.V7"/> or <see cref="TarEntryFormat.Ustar"/>.</exception>
System\Formats\Tar\TarEntry.cs (14)
15/// <remarks>All the properties exposed by this class are supported by the <see cref="TarEntryFormat.V7"/>, <see cref="TarEntryFormat.Ustar"/>, <see cref="TarEntryFormat.Pax"/> and <see cref="TarEntryFormat.Gnu"/> formats.</remarks> 24protected bool FormatIsOctalOnly => _header._format is TarEntryFormat.V7 or TarEntryFormat.Ustar; 27internal TarEntry(TarHeader header, TarReader readerOfOrigin, TarEntryFormat format) 37internal TarEntry(TarEntryType entryType, string entryName, TarEntryFormat format, bool isGea) 53internal TarEntry(TarEntry other, TarEntryFormat format) 82public TarEntryFormat Format => _header._format; 98/// <exception cref="ArgumentOutOfRangeException">The specified value is larger than <see cref="DateTimeOffset.UnixEpoch"/> when using <see cref="TarEntryFormat.V7"/> or <see cref="TarEntryFormat.Ustar"/>.</exception> 115/// <remarks>The entry type that commonly contains data is <see cref="TarEntryType.RegularFile"/> (or <see cref="TarEntryType.V7RegularFile"/> in the <see cref="TarEntryFormat.V7"/> format). Other uncommon entry types that can also contain data are: <see cref="TarEntryType.ContiguousFile"/>, <see cref="TarEntryType.DirectoryList"/>, <see cref="TarEntryType.MultiVolume"/> and <see cref="TarEntryType.SparseFile"/>.</remarks> 250/// <exception cref="InvalidOperationException">Setting a data section is not supported because the <see cref="EntryType"/> is not <see cref="TarEntryType.RegularFile"/> (or <see cref="TarEntryType.V7RegularFile"/> for an archive of <see cref="TarEntryFormat.V7"/> format).</exception>
System\Formats\Tar\TarEntryType.cs (10)
14/// <para>This entry type is specific to the <see cref="TarEntryFormat.Ustar"/>, <see cref="TarEntryFormat.Pax"/> and <see cref="TarEntryFormat.Gnu"/> formats.</para> 46/// <para>This entry type is specific to the <see cref="TarEntryFormat.Gnu"/> format, and is treated as a <see cref="RegularFile"/> entry type.</para> 62/// <para>This entry type is specific to the <see cref="TarEntryFormat.Gnu"/> format, and is treated as a <see cref="Directory"/> entry type that contains a data section.</para> 77/// <para>This entry type is specific to the <see cref="TarEntryFormat.Gnu"/> format and is not supported for writing.</para> 82/// <para>This entry type is specific to the <see cref="TarEntryFormat.V7"/> format.</para> 87/// <para>This entry type is specific to the <see cref="TarEntryFormat.Gnu"/> format. It is considered unsafe and is ignored by other tools.</para> 92/// <para>This entry type is specific to the <see cref="TarEntryFormat.Gnu"/> format and is not supported for writing.</para> 97/// <para>This entry type is specific to the <see cref="TarEntryFormat.Gnu"/> format and is not supported for writing.</para>
System\Formats\Tar\TarFile.cs (2)
330using (TarWriter writer = new TarWriter(destination, TarEntryFormat.Pax, leaveOpen)) 384TarWriter writer = new TarWriter(destination, TarEntryFormat.Pax, leaveOpen);
System\Formats\Tar\TarHeader.cs (11)
48internal TarEntryFormat _format; 90internal TarHeader(TarEntryFormat format, string name = "", int mode = 0, DateTimeOffset mTime = default, TarEntryType typeFlag = TarEntryType.RegularFile) 104internal TarHeader(TarEntryFormat format, TarEntryType typeFlag, TarHeader other) 141private static string GetMagicForFormat(TarEntryFormat format) => format switch 143TarEntryFormat.Ustar or TarEntryFormat.Pax => UstarMagic, 144TarEntryFormat.Gnu => GnuMagic, 148private static string GetVersionForFormat(TarEntryFormat format) => format switch 150TarEntryFormat.Ustar or TarEntryFormat.Pax => UstarVersion, 151TarEntryFormat.Gnu => GnuVersion,
System\Formats\Tar\TarHeader.Read.cs (24)
23internal static TarHeader? TryGetNextHeader(Stream archiveStream, bool copyData, TarEntryFormat initialFormat, bool processDataBlock) 42internal static async ValueTask<TarHeader?> TryGetNextHeaderAsync(Stream archiveStream, bool copyData, TarEntryFormat initialFormat, bool processDataBlock, CancellationToken cancellationToken) 63private static TarHeader? TryReadAttributes(TarEntryFormat initialFormat, ReadOnlySpan<byte> buffer, Stream archiveStream) 72if (header._format != TarEntryFormat.V7) 80Debug.Assert(header._format is TarEntryFormat.Ustar or TarEntryFormat.Pax or TarEntryFormat.Gnu); 81if (header._format == TarEntryFormat.Ustar) 85else if (header._format == TarEntryFormat.Gnu) 364private static TarHeader? TryReadCommonAttributes(ReadOnlySpan<byte> buffer, TarEntryFormat initialFormat) 401if (header._format == TarEntryFormat.Unknown) 406TarEntryType.GlobalExtendedAttributes => TarEntryFormat.Pax, 413TarEntryType.TapeVolume => TarEntryFormat.Gnu, 416TarEntryType.V7RegularFile => TarEntryFormat.V7, 422_ => (header._typeFlag == TarEntryType.RegularFile) ? TarEntryFormat.Ustar : TarEntryFormat.V7 438_format = TarEntryFormat.V7; 446_format = TarEntryFormat.Gnu; 451if (_format == TarEntryFormat.V7) 454_format = TarEntryFormat.Ustar; 467if (_format == TarEntryFormat.V7) 475case TarEntryFormat.Ustar or TarEntryFormat.Pax: 493case TarEntryFormat.Gnu:
System\Formats\Tar\TarHeader.Write.cs (59)
36private void WriteWithSeekableDataStream(TarEntryFormat format, Stream archiveStream, Span<byte> buffer) 38Debug.Assert(format is > TarEntryFormat.Unknown and <= TarEntryFormat.Gnu); 52private async Task WriteWithSeekableDataStreamAsync(TarEntryFormat format, Stream archiveStream, Memory<byte> buffer, CancellationToken cancellationToken) 54Debug.Assert(format is > TarEntryFormat.Unknown and <= TarEntryFormat.Gnu); 68private void WriteWithUnseekableDataStream(TarEntryFormat format, Stream destinationStream, Span<byte> buffer, bool shouldAdvanceToEnd) 80TarEntryFormat.V7 => FieldLocations.V7Data, 81TarEntryFormat.Ustar or TarEntryFormat.Pax => FieldLocations.PosixData, 82TarEntryFormat.Gnu => FieldLocations.GnuData, 120private async Task WriteWithUnseekableDataStreamAsync(TarEntryFormat format, Stream destinationStream, Memory<byte> buffer, bool shouldAdvanceToEnd, CancellationToken cancellationToken) 132TarEntryFormat.V7 => FieldLocations.V7Data, 133TarEntryFormat.Ustar or TarEntryFormat.Pax => FieldLocations.PosixData, 134TarEntryFormat.Gnu => FieldLocations.GnuData, 174TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.V7, _typeFlag); 184TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Ustar, _typeFlag); 226WriteWithUnseekableDataStream(TarEntryFormat.V7, archiveStream, buffer, shouldAdvanceToEnd: true); 230WriteWithSeekableDataStream(TarEntryFormat.V7, archiveStream, buffer); 240return WriteWithUnseekableDataStreamAsync(TarEntryFormat.V7, archiveStream, buffer, shouldAdvanceToEnd: true, cancellationToken); 244return WriteWithSeekableDataStreamAsync(TarEntryFormat.V7, archiveStream, buffer, cancellationToken); 253WriteWithUnseekableDataStream(TarEntryFormat.Ustar, archiveStream, buffer, shouldAdvanceToEnd: true); 257WriteWithSeekableDataStream(TarEntryFormat.Ustar, archiveStream, buffer); 267return WriteWithUnseekableDataStreamAsync(TarEntryFormat.Ustar, archiveStream, buffer, shouldAdvanceToEnd: true, cancellationToken); 271return WriteWithSeekableDataStreamAsync(TarEntryFormat.Ustar, archiveStream, buffer, cancellationToken); 282TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 289WriteWithUnseekableDataStream(TarEntryFormat.Pax, tempStream, buffer, shouldAdvanceToEnd: false); 313WriteWithSeekableDataStream(TarEntryFormat.Pax, archiveStream, buffer); 326TarHeader extendedAttributesHeader = new(TarEntryFormat.Pax); 333await WriteWithUnseekableDataStreamAsync(TarEntryFormat.Pax, tempStream, buffer, shouldAdvanceToEnd: false, cancellationToken).ConfigureAwait(false); 357await WriteWithSeekableDataStreamAsync(TarEntryFormat.Pax, archiveStream, buffer, cancellationToken).ConfigureAwait(false); 379longLinkHeader.WriteWithSeekableDataStream(TarEntryFormat.Gnu, archiveStream, buffer); 388longPathHeader.WriteWithSeekableDataStream(TarEntryFormat.Gnu, archiveStream, buffer); 395WriteWithUnseekableDataStream(TarEntryFormat.Gnu, archiveStream, buffer, shouldAdvanceToEnd: true); 399WriteWithSeekableDataStream(TarEntryFormat.Gnu, archiveStream, buffer); 415await longLinkHeader.WriteWithSeekableDataStreamAsync(TarEntryFormat.Gnu, archiveStream, buffer, cancellationToken).ConfigureAwait(false); 424await longPathHeader.WriteWithSeekableDataStreamAsync(TarEntryFormat.Gnu, archiveStream, buffer, cancellationToken).ConfigureAwait(false); 431await WriteWithUnseekableDataStreamAsync(TarEntryFormat.Gnu, archiveStream, buffer, shouldAdvanceToEnd: true, cancellationToken).ConfigureAwait(false); 435await WriteWithSeekableDataStreamAsync(TarEntryFormat.Gnu, archiveStream, buffer, cancellationToken).ConfigureAwait(false); 466return new(TarEntryFormat.Gnu) 486tmpChecksum += WriteCommonFields(buffer, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Gnu, _typeFlag)); 499WriteWithSeekableDataStream(TarEntryFormat.Pax, archiveStream, buffer); 508return WriteWithSeekableDataStreamAsync(TarEntryFormat.Pax, archiveStream, buffer, cancellationToken); 529tmpChecksum += WriteCommonFields(buffer, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Pax, _typeFlag)); 537private void WriteFieldsToBuffer(TarEntryFormat format, Span<byte> buffer) 541case TarEntryFormat.V7: 544case TarEntryFormat.Ustar: 547case TarEntryFormat.Pax: 550case TarEntryFormat.Gnu: 565if (_format is TarEntryFormat.V7) 685if (_format is not TarEntryFormat.Pax and not TarEntryFormat.Gnu) 743if (_format is not TarEntryFormat.Pax) 761if (_format is not TarEntryFormat.Pax) 1116if (isOctalRange || _format == TarEntryFormat.Pax) 1120else if (_format == TarEntryFormat.Gnu) 1142if (isOctalRange || _format == TarEntryFormat.Pax) 1146else if (_format == TarEntryFormat.Gnu)
System\Formats\Tar\TarHelpers.cs (8)
200internal static TarEntryType GetCorrectTypeFlagForFormat(TarEntryFormat format, TarEntryType entryType) 202if (format is TarEntryFormat.V7) 332internal static void ThrowIfEntryTypeNotSupported(TarEntryType entryType, TarEntryFormat archiveFormat, [CallerArgumentExpression(nameof(entryType))] string? paramName = null) 336case TarEntryFormat.V7: 347case TarEntryFormat.Ustar: 361case TarEntryFormat.Pax: 379case TarEntryFormat.Gnu: 404case TarEntryFormat.Unknown:
System\Formats\Tar\TarReader.cs (23)
111/// <para>More than one Global Extended Attributes Entry was found in the current <see cref="TarEntryFormat.Pax"/> archive.</para> 113/// <para>Two or more Extended Attributes entries were found consecutively in the current <see cref="TarEntryFormat.Pax"/> archive.</para></exception> 138TarEntryFormat.Pax => header._typeFlag is TarEntryType.GlobalExtendedAttributes ? 140TarEntryFormat.Gnu => new GnuTarEntry(header, this), 141TarEntryFormat.Ustar => new UstarTarEntry(header, this), 142TarEntryFormat.V7 or TarEntryFormat.Unknown or _ => new V7TarEntry(header, this), 171/// <para>More than one Global Extended Attributes Entry was found in the current <see cref="TarEntryFormat.Pax"/> archive.</para> 173/// <para>Two or more Extended Attributes entries were found consecutively in the current <see cref="TarEntryFormat.Pax"/> archive.</para></exception> 291TarEntryFormat.Pax => header._typeFlag is TarEntryType.GlobalExtendedAttributes ? 293TarEntryFormat.Gnu => new GnuTarEntry(header, this), 294TarEntryFormat.Ustar => new UstarTarEntry(header, this), 295TarEntryFormat.V7 or TarEntryFormat.Unknown or _ => new V7TarEntry(header, this), 321TarHeader? header = TarHeader.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Unknown, processDataBlock: true); 363TarHeader? header = await TarHeader.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Unknown, processDataBlock: true, cancellationToken).ConfigureAwait(false); 401actualHeader = TarHeader.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Pax, processDataBlock: false); 434TarHeader? actualHeader = await TarHeader.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Pax, processDataBlock: false, cancellationToken).ConfigureAwait(false); 468finalHeader = new(TarEntryFormat.Gnu); 470TarHeader? secondHeader = TarHeader.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true); 488TarHeader? thirdHeader = TarHeader.TryGetNextHeader(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true); 547TarHeader? secondHeader = await TarHeader.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true, cancellationToken).ConfigureAwait(false); 566TarHeader? thirdHeader = await TarHeader.TryGetNextHeaderAsync(_archiveStream, copyData, TarEntryFormat.Gnu, processDataBlock: true, cancellationToken).ConfigureAwait(false);
System\Formats\Tar\TarWriter.cs (44)
27/// <remarks>When using this constructor, <see cref="TarEntryFormat.Pax"/> is used as the default format of the entries written to the archive using the <see cref="WriteEntry(string, string?)"/> method.</remarks> 30/// <remarks>The <see cref="TarEntryFormat.Pax"/> format is the default format as it is the most flexible and POSIX compatible. This is the only format with which <see cref="TarWriter"/> reads and stores <c>atime</c> and <c>ctime</c> when creating entries from filesystem entries.</remarks> 32: this(archiveStream, TarEntryFormat.Pax, leaveOpen: false) 37/// Initializes a <see cref="TarWriter"/> instance that can write tar entries to the specified stream and optionally leaves the stream open upon disposal of this instance. When using this constructor, the format of the resulting archive is <see cref="TarEntryFormat.Pax"/>. 43/// <remarks>The <see cref="TarEntryFormat.Pax"/> format is the default format as it is the most flexible and POSIX compatible. This is the only format with which <see cref="TarWriter"/> reads and stores <c>atime</c> and <c>ctime</c> when creating entries from filesystem entries.</remarks> 45: this(archiveStream, TarEntryFormat.Pax, leaveOpen) 54/// <param name="format">The format to use when calling <see cref="WriteEntry(string, string?)"/>. The default value is <see cref="TarEntryFormat.Pax"/>.</param> 57/// <remarks>The recommended format is <see cref="TarEntryFormat.Pax"/> for its flexibility.</remarks> 60/// <exception cref="ArgumentOutOfRangeException"><paramref name="format"/> is either <see cref="TarEntryFormat.Unknown"/>, or not one of the other enum values.</exception> 61/// <remarks>The <see cref="TarEntryFormat.Pax"/> format is the default for the other <see cref="TarWriter"/> constructors. This is the recommended format as it is the most flexible and POSIX compatible. This is the only format with which <see cref="TarWriter"/> reads and stores <c>atime</c> and <c>ctime</c> when creating entries from filesystem entries.</remarks> 62public TarWriter(Stream archiveStream, TarEntryFormat format = TarEntryFormat.Pax, bool leaveOpen = false) 71if (format is not TarEntryFormat.V7 and not TarEntryFormat.Ustar and not TarEntryFormat.Pax and not TarEntryFormat.Gnu) 87public TarEntryFormat Format { get; } 140/// <para>The entry will be created using the format specified in the <see cref="TarWriter(Stream, TarEntryFormat, bool)"/> constructor, or will use <see cref="TarEntryFormat.Pax"/> if other constructors are used.</para> 141/// <para>If the format is <see cref="TarEntryFormat.Pax"/>, the <c>atime</c> and <c>ctime</c> from the file will be stored in the <see cref="PaxTarEntry.ExtendedAttributes"/> dictionary. If the format is <see cref="TarEntryFormat.Gnu"/>, this method will not set a value for <see cref="GnuTarEntry.AccessTime"/> and <see cref="GnuTarEntry.ChangeTime"/> because most TAR tools do not support these fields for this format.</para> 160/// <para>The entry will be created using the format specified in the <see cref="TarWriter(Stream, TarEntryFormat, bool)"/> constructor, or will use <see cref="TarEntryFormat.Pax"/> if other constructors are used.</para> 161/// <para>If the format is <see cref="TarEntryFormat.Pax"/>, the <c>atime</c> and <c>ctime</c> from the file will be stored in the <see cref="PaxTarEntry.ExtendedAttributes"/> dictionary. If the format is <see cref="TarEntryFormat.Gnu"/>, this method will not set a value for <see cref="GnuTarEntry.AccessTime"/> and <see cref="GnuTarEntry.ChangeTime"/> because most TAR tools do not support these fields for this format.</para> 205/// <para><see cref="TarEntryFormat.V7"/></para> 214/// <para><see cref="TarEntryFormat.Ustar"/>, <see cref="TarEntryFormat.Pax"/> and <see cref="TarEntryFormat.Gnu"/></para> 233/// <para>To ensure an entry preserves the <c>atime</c> and <c>ctime</c> values and it is readable by other tools, it is recommended to convert the entry to <see cref="PaxTarEntry"/> instead. In that format, the two values get stored in the <see cref="PaxTarEntry.ExtendedAttributes"/>. The <see cref="TarEntryFormat.Pax"/> format is used as the default format by <see cref="TarWriter"/> as it is the most flexible and POSIX compatible.</para> 253/// <para><see cref="TarEntryFormat.V7"/></para> 262/// <para><see cref="TarEntryFormat.Ustar"/>, <see cref="TarEntryFormat.Pax"/> and <see cref="TarEntryFormat.Gnu"/></para> 301case TarEntryFormat.V7: 305case TarEntryFormat.Ustar: 309case TarEntryFormat.Pax: 320case TarEntryFormat.Gnu: 325Debug.Assert(entry.Format == TarEntryFormat.Unknown, "Missing format handler"); 343TarEntryFormat.V7 => entry._header.WriteAsV7Async(_archiveStream, buffer, cancellationToken), 344TarEntryFormat.Ustar => entry._header.WriteAsUstarAsync(_archiveStream, buffer, cancellationToken), 345TarEntryFormat.Pax when entry._header._typeFlag is TarEntryType.GlobalExtendedAttributes => entry._header.WriteAsPaxGlobalExtendedAttributesAsync(_archiveStream, buffer, _nextGlobalExtendedAttributesEntryNumber++, cancellationToken), 346TarEntryFormat.Pax => entry._header.WriteAsPaxAsync(_archiveStream, buffer, cancellationToken), 347TarEntryFormat.Gnu => entry._header.WriteAsGnuAsync(_archiveStream, buffer, cancellationToken),
System\Formats\Tar\TarWriter.Unix.cs (5)
36Interop.Sys.FileTypes.S_IFREG => Format is TarEntryFormat.V7 ? TarEntryType.V7RegularFile : TarEntryType.RegularFile, 45TarEntryFormat.V7 => new V7TarEntry(entryType, entryName), 46TarEntryFormat.Ustar => new UstarTarEntry(entryType, entryName), 47TarEntryFormat.Pax => new PaxTarEntry(entryType, entryName), 48TarEntryFormat.Gnu => new GnuTarEntry(entryType, entryName),
System\Formats\Tar\UstarTarEntry.cs (5)
13: base(header, readerOfOrigin, TarEntryFormat.Ustar) 33: base(entryType, entryName, TarEntryFormat.Ustar, isGea: false) 45: base(other, TarEntryFormat.Ustar) 47if (other._header._format is TarEntryFormat.Ustar or TarEntryFormat.Pax)
System\Formats\Tar\V7TarEntry.cs (3)
13: base(header, readerOfOrigin, TarEntryFormat.V7) 28: base(entryType, entryName, TarEntryFormat.V7, isGea: false) 39: base(other, TarEntryFormat.V7)