3 writes to _typeFlag
System.Formats.Tar (3)
System\Formats\Tar\TarHeader.cs (1)
116_typeFlag = typeFlag;
System\Formats\Tar\TarHeader.Write.cs (2)
291_typeFlag = entryType, 332_typeFlag = isGea ? TarEntryType.GlobalExtendedAttributes : TarEntryType.ExtendedAttributes;
49 references to _typeFlag
System.Formats.Tar (49)
System\Formats\Tar\PosixTarEntry.cs (2)
59if (_header._typeFlag is not TarEntryType.BlockDevice and not TarEntryType.CharacterDevice) 86if (_header._typeFlag is not TarEntryType.BlockDevice and not TarEntryType.CharacterDevice)
System\Formats\Tar\TarEntry.cs (2)
77public TarEntryType EntryType => _header._typeFlag; 135if (_header._typeFlag is not TarEntryType.HardLink and not TarEntryType.SymbolicLink)
System\Formats\Tar\TarHeader.cs (1)
261Debug.Assert(_typeFlag is TarEntryType.SymbolicLink or TarEntryType.HardLink);
System\Formats\Tar\TarHeader.Read.cs (11)
117if (_typeFlag is TarEntryType.HardLink or TarEntryType.SymbolicLink && 148if (_typeFlag is TarEntryType.RegularFile or TarEntryType.V7RegularFile) 224switch (_typeFlag) 241throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 382header._format = header._typeFlag switch 397TarEntryType.SparseFile => throw new NotSupportedException(SR.Format(SR.TarEntryTypeNotSupported, header._typeFlag)), 401_ => (header._typeFlag == TarEntryType.RegularFile) ? TarEntryFormat.Ustar : TarEntryFormat.V7 524if (_typeFlag is TarEntryType.CharacterDevice or TarEntryType.BlockDevice) 605throw new InvalidOperationException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag.ToString())); 653if (_typeFlag == TarEntryType.LongLink) 657else if (_typeFlag == TarEntryType.LongPath)
System\Formats\Tar\TarHeader.Write.cs (10)
109TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.V7, _typeFlag); 119TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Ustar, _typeFlag); 140Debug.Assert(_typeFlag is TarEntryType.GlobalExtendedAttributes); 178Debug.Assert(_typeFlag is not TarEntryType.GlobalExtendedAttributes); 304tmpChecksum += WriteCommonFields(buffer, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Gnu, _typeFlag)); 331_mode = TarHelpers.GetDefaultMode(_typeFlag); 339tmpChecksum += WriteCommonFields(buffer, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Pax, _typeFlag)); 459Debug.Assert(!string.IsNullOrEmpty(_linkName) ^ (_typeFlag is not TarEntryType.SymbolicLink and not TarEntryType.HardLink)); 601if (_typeFlag is not TarEntryType.LongLink and not TarEntryType.LongPath) 957return _typeFlag is TarEntryType.Directory or TarEntryType.DirectoryList ?
System\Formats\Tar\TarReader.cs (20)
218TarEntryFormat.Pax => header._typeFlag is TarEntryType.GlobalExtendedAttributes ? 258if (header._typeFlag is TarEntryType.ExtendedAttributes) 268else if (header._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 295if (actualHeader._typeFlag is TarEntryType.GlobalExtendedAttributes or 300throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 325if (secondHeader._typeFlag == header._typeFlag) 327throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 333if ((header._typeFlag is TarEntryType.LongLink && secondHeader._typeFlag is TarEntryType.LongPath) || 334(header._typeFlag is TarEntryType.LongPath && secondHeader._typeFlag is TarEntryType.LongLink)) 344if (thirdHeader._typeFlag is TarEntryType.LongLink or TarEntryType.LongPath) 346throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag)); 349if (header._typeFlag is TarEntryType.LongLink) 357else if (header._typeFlag is TarEntryType.LongPath) 370if (header._typeFlag is TarEntryType.LongLink) 375else if (header._typeFlag is TarEntryType.LongPath)
System\Formats\Tar\TarWriter.cs (3)
248ValidateEntryLinkName(entry._header._typeFlag, entry._header._linkName); 300ValidateEntryLinkName(entry._header._typeFlag, entry._header._linkName); 318TarEntryFormat.Pax when entry._header._typeFlag is TarEntryType.GlobalExtendedAttributes => entry._header.WriteAsPaxGlobalExtendedAttributesCoreAsync<TAdapter>(_archiveStream, buffer, _nextGlobalExtendedAttributesEntryNumber++, cancellationToken),