372 references to TarEntryType
aspire (11)
Agents\AspireSkills\AspireSkillsBundleProvider.cs (5)
499case TarEntryType.Directory: 503case TarEntryType.RegularFile: 504case TarEntryType.V7RegularFile: 514case TarEntryType.GlobalExtendedAttributes: 515case TarEntryType.ExtendedAttributes:
Bundles\BundleService.cs (3)
903case TarEntryType.Directory: 907case TarEntryType.RegularFile: 922case TarEntryType.SymbolicLink:
Utils\ArchiveHelper.cs (3)
97case TarEntryType.Directory: 101case TarEntryType.RegularFile: 116case TarEntryType.SymbolicLink:
Aspire.Cli.Tests (5)
BundleServiceIntegrationTests.cs (5)
588tar.WriteEntry(new PaxTarEntry(TarEntryType.Directory, "aspire-payload/")); 591tar.WriteEntry(new PaxTarEntry(TarEntryType.Directory, $"aspire-payload/{BundleDiscovery.ManagedDirectoryName}/")); 594var managedEntry = new PaxTarEntry(TarEntryType.RegularFile, $"aspire-payload/{BundleDiscovery.ManagedDirectoryName}/{exeName}") 601tar.WriteEntry(new PaxTarEntry(TarEntryType.Directory, $"aspire-payload/{BundleDiscovery.DcpDirectoryName}/")); 606TarEntryType.RegularFile,
Microsoft.Build.Tasks.Core (9)
TarDirectory.cs (6)
479TarEntryType entryType = (isDirectory, isSymbolicLink, format) switch 481(true, _, _) => TarEntryType.Directory, 482(_, true, _) => TarEntryType.SymbolicLink, 483(_, _, TarEntryFormat.V7) => TarEntryType.V7RegularFile, 484_ => TarEntryType.RegularFile, 522private static TarEntry CreateEntry(TarEntryFormat format, TarEntryType entryType, string entryName) => format switch
Untar.cs (3)
297if (tarEntry.EntryType is TarEntryType.Directory || Path.GetFileName(destinationPath.FullName).Length == 0) 315if (tarEntry.EntryType is not (TarEntryType.RegularFile or TarEntryType.V7RegularFile))
Microsoft.NET.Build.Containers (18)
Layer.cs (4)
111var entry = new PaxTarEntry(TarEntryType.Directory, "Files", entryAttributes) 150var entry = new PaxTarEntry(TarEntryType.Directory, "Hives", entryAttributes) 185entry = new(TarEntryType.RegularFile, containerPath, entryAttributes) 192entry = new(TarEntryType.Directory, containerPath, entryAttributes);
LocalDaemons\ContainerArchive.cs (7)
141PaxTarEntry configEntry = new(TarEntryType.RegularFile, configPath) 175PaxTarEntry manifestEntry = new(TarEntryType.RegularFile, "manifest.json") 190PaxTarEntry layoutEntry = new(TarEntryType.RegularFile, "oci-layout") 206PaxTarEntry manifestEntry = new(TarEntryType.RegularFile, manifestPath) 237PaxTarEntry indexEntry = new(TarEntryType.RegularFile, "index.json") 278PaxTarEntry manifestListEntry = new(TarEntryType.RegularFile, $"{BlobsPath}/{manifestListSha}") 297PaxTarEntry indexEntry = new(TarEntryType.RegularFile, "index.json")
LocalDaemons\DockerCli.cs (7)
370PaxTarEntry configEntry = new(TarEntryType.RegularFile, configPath) 401PaxTarEntry manifestEntry = new(TarEntryType.RegularFile, "manifest.json") 439PaxTarEntry layoutEntry = new(TarEntryType.RegularFile, ociLayoutPath) 457PaxTarEntry manifestEntry = new(TarEntryType.RegularFile, manifestPath) 482PaxTarEntry indexEntry = new(TarEntryType.RegularFile, "index.json") 545PaxTarEntry indexEntry = new(TarEntryType.RegularFile, manifestListPath) 564PaxTarEntry indexEntry = new(TarEntryType.RegularFile, "index.json")
sdk-tasks (1)
ExtractArchiveToDirectory.cs (1)
122if (tarEntry.EntryType != TarEntryType.Directory)
System.Formats.Tar (328)
System\Formats\Tar\GnuTarEntry.cs (10)
27/// <para>When creating an instance using the <see cref="GnuTarEntry(TarEntryType, string)"/> constructor, only the following entry types are supported:</para> 29/// <item>In all platforms: <see cref="TarEntryType.Directory"/>, <see cref="TarEntryType.HardLink"/>, <see cref="TarEntryType.SymbolicLink"/>, <see cref="TarEntryType.RegularFile"/>.</item> 30/// <item>In Unix platforms only: <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> and <see cref="TarEntryType.Fifo"/>.</item> 37public GnuTarEntry(TarEntryType entryType, string entryName) 100internal override bool IsDataStreamSetterSupported() => EntryType is TarEntryType.RegularFile;
System\Formats\Tar\PaxGlobalExtendedAttributesTarEntry.cs (1)
26: 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 (20)
26/// <remarks><para>When creating an instance using the <see cref="PaxTarEntry(TarEntryType, string)"/> constructor, only the following entry types are supported:</para> 28/// <item>In all platforms: <see cref="TarEntryType.Directory"/>, <see cref="TarEntryType.HardLink"/>, <see cref="TarEntryType.SymbolicLink"/>, <see cref="TarEntryType.RegularFile"/>.</item> 29/// <item>In Unix platforms only: <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> and <see cref="TarEntryType.Fifo"/>.</item> 31/// <para>Use the <see cref="PaxTarEntry(TarEntryType, string, IEnumerable{KeyValuePair{string, string}})"/> constructor to include extended attributes when creating the entry.</para> 37public PaxTarEntry(TarEntryType entryType, string entryName) 49/// <remarks><para>When creating an instance using the <see cref="PaxTarEntry(TarEntryType, string, IEnumerable{KeyValuePair{string, string}})"/> constructor, only the following entry types are supported:</para> 51/// <item>In all platforms: <see cref="TarEntryType.Directory"/>, <see cref="TarEntryType.HardLink"/>, <see cref="TarEntryType.SymbolicLink"/>, <see cref="TarEntryType.RegularFile"/>.</item> 52/// <item>In Unix platforms only: <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> and <see cref="TarEntryType.Fifo"/>.</item> 66public PaxTarEntry(TarEntryType entryType, string entryName, IEnumerable<KeyValuePair<string, string>> extendedAttributes) 132internal override bool IsDataStreamSetterSupported() => EntryType == TarEntryType.RegularFile;
System\Formats\Tar\PosixTarEntry.cs (5)
22internal PosixTarEntry(TarEntryType entryType, string entryName, TarEntryFormat format, bool isGea) 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 (63)
37internal TarEntry(TarEntryType entryType, string entryName, TarEntryFormat format, bool isGea) 41Debug.Assert(!isGea || entryType is TarEntryType.GlobalExtendedAttributes); 60TarEntryType compatibleEntryType = TarHelpers.GetCorrectTypeFlagForFormat(format, other.EntryType); 77public TarEntryType EntryType => _header._typeFlag; 120/// <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> 124/// When the <see cref="EntryType"/> indicates a <see cref="TarEntryType.SymbolicLink"/> or a <see cref="TarEntryType.HardLink"/>, this property returns the link target path of such link. 127/// <exception cref="InvalidOperationException">The entry type is not <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/>.</exception> 135if (_header._typeFlag is not TarEntryType.HardLink and not TarEntryType.SymbolicLink) 198/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 199/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para> 216if (EntryType is TarEntryType.SymbolicLink or TarEntryType.HardLink or TarEntryType.GlobalExtendedAttributes) 231/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 232/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 251if (EntryType is TarEntryType.SymbolicLink or TarEntryType.HardLink or TarEntryType.GlobalExtendedAttributes) 265/// <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> 326if (EntryType == TarEntryType.Directory) 349if (EntryType == TarEntryType.Directory) 379if (EntryType is TarEntryType.SymbolicLink) 401else if (EntryType is TarEntryType.HardLink) 536if (EntryType is TarEntryType.RegularFile or TarEntryType.V7RegularFile or TarEntryType.ContiguousFile) 555if (EntryType is TarEntryType.RegularFile or TarEntryType.V7RegularFile or TarEntryType.ContiguousFile) 568Debug.Assert(EntryType is not (TarEntryType.RegularFile or TarEntryType.V7RegularFile or TarEntryType.ContiguousFile)); 572case TarEntryType.Directory: 573case TarEntryType.DirectoryList: 589case TarEntryType.SymbolicLink: 595case TarEntryType.HardLink: 608case TarEntryType.BlockDevice: 612case TarEntryType.CharacterDevice: 616case TarEntryType.Fifo: 620case TarEntryType.ExtendedAttributes: 621case TarEntryType.GlobalExtendedAttributes: 622case TarEntryType.LongPath: 623case TarEntryType.LongLink: 627case TarEntryType.MultiVolume: 628case TarEntryType.RenamedOrSymlinked: 629case TarEntryType.SparseFile: 630case TarEntryType.TapeVolume: 669Debug.Assert(EntryType is TarEntryType.HardLink);
System\Formats\Tar\TarEntry.Unix.cs (3)
16Debug.Assert(EntryType is TarEntryType.BlockDevice); 23Debug.Assert(EntryType is TarEntryType.CharacterDevice); 30Debug.Assert(EntryType is TarEntryType.Fifo);
System\Formats\Tar\TarFile.cs (42)
268/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 269/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 288/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 289/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 330/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 331/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 352/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 353/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 396/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 397/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 415/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 416/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 459/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 460/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 480/// <remarks><para>Files of type <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> or <see cref="TarEntryType.Fifo"/> can only be extracted in Unix platforms.</para> 481/// <para>Elevation is required to extract a <see cref="TarEntryType.BlockDevice"/> or <see cref="TarEntryType.CharacterDevice"/> to disk.</para></remarks> 662if (entry.EntryType is not TarEntryType.GlobalExtendedAttributes) 710if (entry.EntryType is not TarEntryType.GlobalExtendedAttributes)
System\Formats\Tar\TarHardLinkMode.cs (1)
14/// occurrences are written as <see cref="TarEntryType.HardLink"/> entries.
System\Formats\Tar\TarHeader.cs (6)
68internal TarEntryType _typeFlag; 110internal TarHeader(TarEntryFormat format, string name = "", int mode = 0, DateTimeOffset mTime = default, TarEntryType typeFlag = TarEntryType.RegularFile) 124internal TarHeader(TarEntryFormat format, TarEntryType typeFlag, TarHeader other) 264Debug.Assert(_typeFlag is TarEntryType.SymbolicLink or TarEntryType.HardLink);
System\Formats\Tar\TarHeader.Read.cs (38)
175if (_typeFlag is TarEntryType.HardLink or TarEntryType.SymbolicLink && 206if (_typeFlag is TarEntryType.RegularFile or TarEntryType.V7RegularFile) 302case TarEntryType.ExtendedAttributes or TarEntryType.GlobalExtendedAttributes: 305case TarEntryType.LongLink or TarEntryType.LongPath: 308case TarEntryType.BlockDevice: 309case TarEntryType.CharacterDevice: 310case TarEntryType.Directory: 311case TarEntryType.Fifo: 312case TarEntryType.HardLink: 313case TarEntryType.SymbolicLink: 320case TarEntryType.RegularFile: 321case TarEntryType.V7RegularFile: // Treated as regular file 322case TarEntryType.ContiguousFile: // Treated as regular file 323case TarEntryType.DirectoryList: // Contains the list of filesystem entries in the data section 324case TarEntryType.MultiVolume: // Contains portion of a file 325case TarEntryType.RenamedOrSymlinked: // Might contain data 326case TarEntryType.SparseFile: // Contains portion of a file 327case TarEntryType.TapeVolume: // Might contain data 452typeFlag: (TarEntryType)buffer[FieldLocations.TypeFlag]) 465TarEntryType.ExtendedAttributes or 466TarEntryType.GlobalExtendedAttributes => TarEntryFormat.Pax, 468TarEntryType.DirectoryList or 469TarEntryType.LongLink or 470TarEntryType.LongPath or 471TarEntryType.MultiVolume or 472TarEntryType.RenamedOrSymlinked or 473TarEntryType.TapeVolume => TarEntryFormat.Gnu, 476TarEntryType.V7RegularFile => TarEntryFormat.V7, 478TarEntryType.SparseFile => throw new NotSupportedException(SR.Format(SR.TarEntryTypeNotSupported, header._typeFlag)), 482_ => (header._typeFlag == TarEntryType.RegularFile) ? TarEntryFormat.Ustar : TarEntryFormat.V7 605if (_typeFlag is TarEntryType.CharacterDevice or TarEntryType.BlockDevice) 736if (_typeFlag == TarEntryType.LongLink) 740else if (_typeFlag == TarEntryType.LongPath)
System\Formats\Tar\TarHeader.Write.cs (19)
162TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.V7, _typeFlag); 172TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Ustar, _typeFlag); 199Debug.Assert(_typeFlag is TarEntryType.GlobalExtendedAttributes); 264Debug.Assert(_typeFlag is not TarEntryType.GlobalExtendedAttributes); 296Debug.Assert(_typeFlag is not TarEntryType.GlobalExtendedAttributes); 418return GetGnuLongMetadataHeader(dataStream, TarEntryType.LongLink); 424return GetGnuLongMetadataHeader(dataStream, TarEntryType.LongPath); 428private static TarHeader GetGnuLongMetadataHeader(MemoryStream dataStream, TarEntryType entryType) 430Debug.Assert(entryType is TarEntryType.LongPath or TarEntryType.LongLink); 487_typeFlag = isGea ? TarEntryType.GlobalExtendedAttributes : TarEntryType.ExtendedAttributes; 611private int WriteCommonFields(Span<byte> buffer, TarEntryType actualEntryType) 614Debug.Assert(!string.IsNullOrEmpty(_linkName) ^ (_typeFlag is not TarEntryType.SymbolicLink and not TarEntryType.HardLink)); 756if (_typeFlag is not TarEntryType.LongLink and not TarEntryType.LongPath) 1135return _typeFlag is TarEntryType.Directory or TarEntryType.DirectoryList ?
System\Formats\Tar\TarHelpers.cs (38)
48internal static int GetDefaultMode(TarEntryType type) 49=> type is TarEntryType.Directory or TarEntryType.DirectoryList ? (int)DefaultDirectoryMode : (int)DefaultFileMode; 198internal static TarEntryType GetRegularFileEntryTypeForFormat(TarEntryFormat format) => format is TarEntryFormat.V7 ? TarEntryType.V7RegularFile : TarEntryType.RegularFile; 203internal static TarEntryType GetCorrectTypeFlagForFormat(TarEntryFormat format, TarEntryType entryType) => 206(TarEntryFormat.V7, TarEntryType.RegularFile) => TarEntryType.V7RegularFile, 207(not TarEntryFormat.V7, TarEntryType.V7RegularFile) => TarEntryType.RegularFile, 296internal static void ThrowIfEntryTypeNotSupported(TarEntryType entryType, TarEntryFormat archiveFormat, [CallerArgumentExpression(nameof(entryType))] string? paramName = null) 302TarEntryType.Directory or 303TarEntryType.HardLink or 304TarEntryType.V7RegularFile or 305TarEntryType.SymbolicLink) 313TarEntryType.BlockDevice or 314TarEntryType.CharacterDevice or 315TarEntryType.Directory or 316TarEntryType.Fifo or 317TarEntryType.HardLink or 318TarEntryType.RegularFile or 319TarEntryType.SymbolicLink) 327TarEntryType.BlockDevice or 328TarEntryType.CharacterDevice or 329TarEntryType.Directory or 330TarEntryType.Fifo or 331TarEntryType.HardLink or 332TarEntryType.RegularFile or 333TarEntryType.SymbolicLink) 345TarEntryType.BlockDevice or 346TarEntryType.CharacterDevice or 347TarEntryType.Directory or 348TarEntryType.Fifo or 349TarEntryType.HardLink or 350TarEntryType.RegularFile or 351TarEntryType.SymbolicLink)
System\Formats\Tar\TarReader.cs (19)
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 296TarEntryType.ExtendedAttributes or 297TarEntryType.LongLink or 298TarEntryType.LongPath) 300throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 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) 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 (32)
216/// <item><see cref="TarEntryType.Directory"/></item> 217/// <item><see cref="TarEntryType.HardLink"/></item> 218/// <item><see cref="TarEntryType.SymbolicLink"/></item> 219/// <item><see cref="TarEntryType.V7RegularFile"/></item> 225/// <item><see cref="TarEntryType.BlockDevice"/></item> 226/// <item><see cref="TarEntryType.CharacterDevice"/></item> 227/// <item><see cref="TarEntryType.Directory"/></item> 228/// <item><see cref="TarEntryType.Fifo"/></item> 229/// <item><see cref="TarEntryType.HardLink"/></item> 230/// <item><see cref="TarEntryType.RegularFile"/></item> 231/// <item><see cref="TarEntryType.SymbolicLink"/></item> 236/// <exception cref="ArgumentException">The entry type is <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/> and the <see cref="TarEntry.LinkName"/> is <see langword="null"/> or empty.</exception> 264/// <item><see cref="TarEntryType.Directory"/></item> 265/// <item><see cref="TarEntryType.HardLink"/></item> 266/// <item><see cref="TarEntryType.SymbolicLink"/></item> 267/// <item><see cref="TarEntryType.V7RegularFile"/></item> 273/// <item><see cref="TarEntryType.BlockDevice"/></item> 274/// <item><see cref="TarEntryType.CharacterDevice"/></item> 275/// <item><see cref="TarEntryType.Directory"/></item> 276/// <item><see cref="TarEntryType.Fifo"/></item> 277/// <item><see cref="TarEntryType.HardLink"/></item> 278/// <item><see cref="TarEntryType.RegularFile"/></item> 279/// <item><see cref="TarEntryType.SymbolicLink"/></item> 284/// <exception cref="ArgumentException">The entry type is <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/> and the <see cref="TarEntry.LinkName"/> is <see langword="null"/> or empty.</exception> 318if (entry._header._typeFlag is TarEntryType.GlobalExtendedAttributes) 353TarEntryFormat.Pax when entry._header._typeFlag is TarEntryType.GlobalExtendedAttributes => entry._header.WriteAsPaxGlobalExtendedAttributesCoreAsync<TAdapter>(_archiveStream, buffer, _nextGlobalExtendedAttributesEntryNumber++, cancellationToken), 407private static void ValidateEntryLinkName(TarEntryType entryType, string? linkName) 409if (entryType is TarEntryType.HardLink or TarEntryType.SymbolicLink) 419private TarEntry CreateEntryForFormat(TarEntryType entryType, string entryName) =>
System\Formats\Tar\TarWriter.Unix.cs (14)
43TarEntryType entryType; 46entryType = TarEntryType.HardLink; 53Interop.Sys.FileTypes.S_IFBLK => TarEntryType.BlockDevice, 54Interop.Sys.FileTypes.S_IFCHR => TarEntryType.CharacterDevice, 55Interop.Sys.FileTypes.S_IFIFO => TarEntryType.Fifo, 56Interop.Sys.FileTypes.S_IFLNK => TarEntryType.SymbolicLink, 58Interop.Sys.FileTypes.S_IFDIR => TarEntryType.Directory, 63FileSystemInfo info = entryType is TarEntryType.Directory ? new DirectoryInfo(fullPath) : new FileInfo(fullPath); 67if (entryType is TarEntryType.BlockDevice or TarEntryType.CharacterDevice) 110if (entry.EntryType == TarEntryType.SymbolicLink) 115if (entry.EntryType == TarEntryType.HardLink) 121if (entry.EntryType is TarEntryType.RegularFile or TarEntryType.V7RegularFile)
System\Formats\Tar\UstarTarEntry.cs (10)
22/// <remarks>When creating an instance using the <see cref="UstarTarEntry(TarEntryType, string)"/> constructor, only the following entry types are supported: 24/// <item>In all platforms: <see cref="TarEntryType.Directory"/>, <see cref="TarEntryType.HardLink"/>, <see cref="TarEntryType.SymbolicLink"/>, <see cref="TarEntryType.RegularFile"/>.</item> 25/// <item>In Unix platforms only: <see cref="TarEntryType.BlockDevice"/>, <see cref="TarEntryType.CharacterDevice"/> and <see cref="TarEntryType.Fifo"/>.</item> 32public UstarTarEntry(TarEntryType entryType, string entryName) 58internal override bool IsDataStreamSetterSupported() => EntryType == TarEntryType.RegularFile;
System\Formats\Tar\V7TarEntry.cs (7)
22/// <remarks>When creating an instance using the <see cref="V7TarEntry(TarEntryType, string)"/> constructor, only the following entry types are supported: <see cref="TarEntryType.Directory"/>, <see cref="TarEntryType.HardLink"/>, <see cref="TarEntryType.SymbolicLink"/> and <see cref="TarEntryType.V7RegularFile"/>.</remarks> 27public V7TarEntry(TarEntryType entryType, string entryName) 44internal override bool IsDataStreamSetterSupported() => EntryType == TarEntryType.V7RegularFile;