3 writes to _typeFlag
System.Formats.Tar (3)
System\Formats\Tar\TarHeader.cs (1)
96_typeFlag = typeFlag;
System\Formats\Tar\TarHeader.Write.cs (2)
441_typeFlag = entryType, 486_typeFlag = isGea ? TarEntryType.GlobalExtendedAttributes : TarEntryType.ExtendedAttributes;
71 references to _typeFlag
System.Formats.Tar (71)
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)
187switch (_typeFlag) 204throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 249switch (_typeFlag) 266throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 401header._format = header._typeFlag switch 416TarEntryType.SparseFile => throw new NotSupportedException(SR.Format(SR.TarEntryTypeNotSupported, header._typeFlag)), 420_ => (header._typeFlag == TarEntryType.RegularFile) ? TarEntryFormat.Ustar : TarEntryFormat.V7 525if (_typeFlag is TarEntryType.CharacterDevice or TarEntryType.BlockDevice) 617throw new InvalidOperationException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag.ToString())); 684if (_typeFlag == TarEntryType.LongLink) 688else if (_typeFlag == TarEntryType.LongPath)
System\Formats\Tar\TarHeader.Write.cs (11)
171TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.V7, _typeFlag); 181TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Ustar, _typeFlag); 213Debug.Assert(_typeFlag is TarEntryType.GlobalExtendedAttributes); 276Debug.Assert(_typeFlag is not TarEntryType.GlobalExtendedAttributes); 319Debug.Assert(_typeFlag is not TarEntryType.GlobalExtendedAttributes); 450tmpChecksum += WriteCommonFields(buffer, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Gnu, _typeFlag)); 485_mode = TarHelpers.GetDefaultMode(_typeFlag); 493tmpChecksum += WriteCommonFields(buffer, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Pax, _typeFlag)); 613Debug.Assert(!string.IsNullOrEmpty(_linkName) ^ (_typeFlag is not TarEntryType.SymbolicLink and not TarEntryType.HardLink)); 918Debug.Assert(_typeFlag is TarEntryType.SymbolicLink or TarEntryType.HardLink); 1159return _typeFlag is TarEntryType.Directory or TarEntryType.DirectoryList ?
System\Formats\Tar\TarReader.cs (41)
138TarEntryFormat.Pax => header._typeFlag is TarEntryType.GlobalExtendedAttributes ? 291TarEntryFormat.Pax => header._typeFlag is TarEntryType.GlobalExtendedAttributes ? 331if (header._typeFlag is TarEntryType.ExtendedAttributes) 340else if (header._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 372if (header._typeFlag is TarEntryType.ExtendedAttributes) 382else if (header._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 409if (actualHeader._typeFlag is TarEntryType.GlobalExtendedAttributes or 414throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 441if (actualHeader._typeFlag is TarEntryType.GlobalExtendedAttributes or 446throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 450if (actualHeader._typeFlag is TarEntryType.ExtendedAttributes) 479if (secondHeader._typeFlag == header._typeFlag) 481throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 485if ((header._typeFlag is TarEntryType.LongLink && secondHeader._typeFlag is TarEntryType.LongPath) || 486(header._typeFlag is TarEntryType.LongPath && secondHeader._typeFlag is TarEntryType.LongLink)) 497if (thirdHeader._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 499throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag)); 502if (header._typeFlag is TarEntryType.LongLink) 510else if (header._typeFlag is TarEntryType.LongPath) 523if (header._typeFlag is TarEntryType.LongLink) 528else if (header._typeFlag is TarEntryType.LongPath) 554if (secondHeader._typeFlag == header._typeFlag) 556throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 562if ((header._typeFlag is TarEntryType.LongLink && secondHeader._typeFlag is TarEntryType.LongPath) || 563(header._typeFlag is TarEntryType.LongPath && secondHeader._typeFlag is TarEntryType.LongLink)) 573if (thirdHeader._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 575throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag)); 578if (header._typeFlag is TarEntryType.LongLink) 586else if (header._typeFlag is TarEntryType.LongPath) 599if (header._typeFlag is TarEntryType.LongLink) 604else if (header._typeFlag is TarEntryType.LongPath)
System\Formats\Tar\TarWriter.cs (4)
224ValidateEntryLinkName(entry._header._typeFlag, entry._header._linkName); 273ValidateEntryLinkName(entry._header._typeFlag, entry._header._linkName); 295if (entry._header._typeFlag is TarEntryType.GlobalExtendedAttributes) 330TarEntryFormat.Pax when entry._header._typeFlag is TarEntryType.GlobalExtendedAttributes => entry._header.WriteAsPaxGlobalExtendedAttributesAsync(_archiveStream, buffer, _nextGlobalExtendedAttributesEntryNumber++, cancellationToken),