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