3 writes to _typeFlag
System.Formats.Tar (3)
System\Formats\Tar\TarHeader.cs (1)
92_typeFlag = typeFlag;
System\Formats\Tar\TarHeader.Write.cs (2)
473_typeFlag = entryType, 522_typeFlag = isGea ? TarEntryType.GlobalExtendedAttributes : TarEntryType.ExtendedAttributes;
72 references to _typeFlag
System.Formats.Tar (72)
System\Formats\Tar\PosixTarEntry.cs (2)
59if (_header._typeFlag is not TarEntryType.BlockDevice and not TarEntryType.CharacterDevice) 85if (_header._typeFlag is not TarEntryType.BlockDevice and not TarEntryType.CharacterDevice)
System\Formats\Tar\TarEntry.cs (2)
77public TarEntryType EntryType => _header._typeFlag; 129if (_header._typeFlag is not TarEntryType.HardLink and not TarEntryType.SymbolicLink)
System\Formats\Tar\TarHeader.Read.cs (11)
188switch (_typeFlag) 205throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 250switch (_typeFlag) 267throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 402header._format = header._typeFlag switch 417TarEntryType.SparseFile => throw new NotSupportedException(SR.Format(SR.TarEntryTypeNotSupported, header._typeFlag)), 421_ => (header._typeFlag == TarEntryType.RegularFile) ? TarEntryFormat.Ustar : TarEntryFormat.V7 526if (_typeFlag is TarEntryType.CharacterDevice or TarEntryType.BlockDevice) 629throw new InvalidOperationException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag.ToString())); 700if (_typeFlag == TarEntryType.LongLink) 704else if (_typeFlag == TarEntryType.LongPath)
System\Formats\Tar\TarHeader.Write.cs (12)
174TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.V7, _typeFlag); 184TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Ustar, _typeFlag); 216Debug.Assert(_typeFlag is TarEntryType.GlobalExtendedAttributes); 279Debug.Assert(_typeFlag is not TarEntryType.GlobalExtendedAttributes); 322Debug.Assert(_typeFlag is not TarEntryType.GlobalExtendedAttributes); 486tmpChecksum += WriteCommonFields(buffer, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Gnu, _typeFlag)); 521_mode = TarHelpers.GetDefaultMode(_typeFlag); 529tmpChecksum += WriteCommonFields(buffer, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Pax, _typeFlag)); 649Debug.Assert(!string.IsNullOrEmpty(_linkName) ^ (_typeFlag is not TarEntryType.SymbolicLink and not TarEntryType.HardLink)); 791if (_typeFlag is not TarEntryType.LongLink and not TarEntryType.LongPath) 954Debug.Assert(_typeFlag is TarEntryType.SymbolicLink or TarEntryType.HardLink); 1201return _typeFlag is TarEntryType.Directory or TarEntryType.DirectoryList ?
System\Formats\Tar\TarReader.cs (41)
138TarEntryFormat.Pax => header._typeFlag is TarEntryType.GlobalExtendedAttributes ? 273TarEntryFormat.Pax => header._typeFlag is TarEntryType.GlobalExtendedAttributes ? 313if (header._typeFlag is TarEntryType.ExtendedAttributes) 322else if (header._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 354if (header._typeFlag is TarEntryType.ExtendedAttributes) 364else if (header._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 391if (actualHeader._typeFlag is TarEntryType.GlobalExtendedAttributes or 396throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 423if (actualHeader._typeFlag is TarEntryType.GlobalExtendedAttributes or 428throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 432if (actualHeader._typeFlag is TarEntryType.ExtendedAttributes) 461if (secondHeader._typeFlag == header._typeFlag) 463throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 467if ((header._typeFlag is TarEntryType.LongLink && secondHeader._typeFlag is TarEntryType.LongPath) || 468(header._typeFlag is TarEntryType.LongPath && secondHeader._typeFlag is TarEntryType.LongLink)) 479if (thirdHeader._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 481throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag)); 484if (header._typeFlag is TarEntryType.LongLink) 492else if (header._typeFlag is TarEntryType.LongPath) 505if (header._typeFlag is TarEntryType.LongLink) 510else if (header._typeFlag is TarEntryType.LongPath) 536if (secondHeader._typeFlag == header._typeFlag) 538throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 544if ((header._typeFlag is TarEntryType.LongLink && secondHeader._typeFlag is TarEntryType.LongPath) || 545(header._typeFlag is TarEntryType.LongPath && secondHeader._typeFlag is TarEntryType.LongLink)) 555if (thirdHeader._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 557throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag)); 560if (header._typeFlag is TarEntryType.LongLink) 568else if (header._typeFlag is TarEntryType.LongPath) 581if (header._typeFlag is TarEntryType.LongLink) 586else if (header._typeFlag is TarEntryType.LongPath)
System\Formats\Tar\TarWriter.cs (4)
239ValidateEntryLinkName(entry._header._typeFlag, entry._header._linkName); 288ValidateEntryLinkName(entry._header._typeFlag, entry._header._linkName); 310if (entry._header._typeFlag is TarEntryType.GlobalExtendedAttributes) 345TarEntryFormat.Pax when entry._header._typeFlag is TarEntryType.GlobalExtendedAttributes => entry._header.WriteAsPaxGlobalExtendedAttributesAsync(_archiveStream, buffer, _nextGlobalExtendedAttributesEntryNumber++, cancellationToken),