395 references to TarEntryType
aspire (6)
Bundles\BundleService.cs (3)
921
case
TarEntryType
.Directory:
925
case
TarEntryType
.RegularFile:
940
case
TarEntryType
.SymbolicLink:
Utils\ArchiveHelper.cs (3)
97
case
TarEntryType
.Directory:
101
case
TarEntryType
.RegularFile:
116
case
TarEntryType
.SymbolicLink:
Aspire.Cli.EndToEnd.Tests (4)
Helpers\CliE2ETestHelpers.cs (2)
1174
if (entry.EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile))
Helpers\CliInstallStrategyTests.cs (1)
28
tar.WriteEntry(new PaxTarEntry(
TarEntryType
.RegularFile, packageEntry));
SettledNpmReleasesTests.cs (1)
178
tar.WriteEntry(new UstarTarEntry(
TarEntryType
.RegularFile, "package/package.json")
Aspire.Cli.Tests (14)
BundleServiceIntegrationTests.cs (14)
689
tar.WriteEntry(new PaxTarEntry(
TarEntryType
.Directory, "aspire-payload/"));
692
tar.WriteEntry(new PaxTarEntry(
TarEntryType
.Directory, $"aspire-payload/{BundleDiscovery.ManagedDirectoryName}/"));
695
var managedEntry = new PaxTarEntry(
TarEntryType
.RegularFile, $"aspire-payload/{BundleDiscovery.ManagedDirectoryName}/{exeName}")
704
tar.WriteEntry(new PaxTarEntry(
TarEntryType
.RegularFile, $"aspire-payload/terminalhost/{file}")
711
tar.WriteEntry(new PaxTarEntry(
TarEntryType
.Directory, $"aspire-payload/{BundleDiscovery.DashboardDirectoryName}/"));
713
TarEntryType
.RegularFile,
719
tar.WriteEntry(new PaxTarEntry(
TarEntryType
.Directory, $"aspire-payload/{BundleDiscovery.DashboardDirectoryName}/wwwroot/"));
721
TarEntryType
.RegularFile,
728
tar.WriteEntry(new PaxTarEntry(
TarEntryType
.Directory, $"aspire-payload/{BundleDiscovery.DashboardDirectoryName}/wwwroot/_framework/"));
731
TarEntryType
.RegularFile,
740
TarEntryType
.RegularFile,
747
tar.WriteEntry(new PaxTarEntry(
TarEntryType
.Directory, $"aspire-payload/{BundleDiscovery.DcpDirectoryName}/"));
752
TarEntryType
.RegularFile,
762
var trayEntry = new PaxTarEntry(
TarEntryType
.RegularFile, $"aspire-payload/{TrayExecutablePath}")
Aspire.Hosting (2)
Publishing\ContainerImageArchiveRewriter.cs (2)
502
if (entry.EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile))
Aspire.Hosting.TestUtilities (4)
Publishing\TestContainerImageArchive.cs (4)
133
if (layerEntry.EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile))
177
var layerEntry = new PaxTarEntry(
TarEntryType
.RegularFile, "layer.tar")
224
var entry = new PaxTarEntry(
TarEntryType
.RegularFile, name)
CreateLayout (1)
Program.cs (1)
471
var entry = new System.Formats.Tar.PaxTarEntry(System.Formats.Tar.
TarEntryType
.RegularFile, relativePath)
Infrastructure.Tests (6)
Pipelines\TrayBundleTests.cs (6)
75
if (entry.EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile))
181
if (entry.EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile))
288
if (entry.EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile))
Microsoft.Build.Tasks.Core (9)
TarDirectory.cs (6)
500
TarEntryType
entryType = (isDirectory, isSymbolicLink, format) switch
502
(true, _, _) =>
TarEntryType
.Directory,
503
(_, true, _) =>
TarEntryType
.SymbolicLink,
504
(_, _, TarEntryFormat.V7) =>
TarEntryType
.V7RegularFile,
505
_ =>
TarEntryType
.RegularFile,
543
private static TarEntry CreateEntry(TarEntryFormat format,
TarEntryType
entryType, string entryName) => format switch
Untar.cs (3)
302
if (tarEntry.EntryType is
TarEntryType
.Directory || Path.GetFileName(destinationPath.FullName).Length == 0)
320
if (tarEntry.EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile))
Microsoft.NET.Build.Containers (18)
Layer.cs (4)
111
var entry = new PaxTarEntry(
TarEntryType
.Directory, "Files", entryAttributes)
150
var entry = new PaxTarEntry(
TarEntryType
.Directory, "Hives", entryAttributes)
185
entry = new(
TarEntryType
.RegularFile, containerPath, entryAttributes)
192
entry = new(
TarEntryType
.Directory, containerPath, entryAttributes);
LocalDaemons\ContainerArchive.cs (7)
141
PaxTarEntry configEntry = new(
TarEntryType
.RegularFile, configPath)
175
PaxTarEntry manifestEntry = new(
TarEntryType
.RegularFile, "manifest.json")
190
PaxTarEntry layoutEntry = new(
TarEntryType
.RegularFile, "oci-layout")
206
PaxTarEntry manifestEntry = new(
TarEntryType
.RegularFile, manifestPath)
237
PaxTarEntry indexEntry = new(
TarEntryType
.RegularFile, "index.json")
278
PaxTarEntry manifestListEntry = new(
TarEntryType
.RegularFile, $"{BlobsPath}/{manifestListSha}")
297
PaxTarEntry indexEntry = new(
TarEntryType
.RegularFile, "index.json")
LocalDaemons\DockerCli.cs (7)
370
PaxTarEntry configEntry = new(
TarEntryType
.RegularFile, configPath)
401
PaxTarEntry manifestEntry = new(
TarEntryType
.RegularFile, "manifest.json")
439
PaxTarEntry layoutEntry = new(
TarEntryType
.RegularFile, ociLayoutPath)
457
PaxTarEntry manifestEntry = new(
TarEntryType
.RegularFile, manifestPath)
482
PaxTarEntry indexEntry = new(
TarEntryType
.RegularFile, "index.json")
545
PaxTarEntry indexEntry = new(
TarEntryType
.RegularFile, manifestListPath)
564
PaxTarEntry indexEntry = new(
TarEntryType
.RegularFile, "index.json")
sdk-tasks (1)
ExtractArchiveToDirectory.cs (1)
122
if (tarEntry.EntryType !=
TarEntryType
.Directory)
System.Formats.Tar (330)
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>
37
public GnuTarEntry(
TarEntryType
entryType, string entryName)
100
internal 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>
37
public 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>
66
public PaxTarEntry(
TarEntryType
entryType, string entryName, IEnumerable<KeyValuePair<string, string>> extendedAttributes)
132
internal override bool IsDataStreamSetterSupported() => EntryType ==
TarEntryType
.RegularFile;
System\Formats\Tar\PosixTarEntry.cs (5)
22
internal PosixTarEntry(
TarEntryType
entryType, string entryName, TarEntryFormat format, bool isGea)
59
if (_header._typeFlag is not
TarEntryType
.BlockDevice and not
TarEntryType
.CharacterDevice)
86
if (_header._typeFlag is not
TarEntryType
.BlockDevice and not
TarEntryType
.CharacterDevice)
System\Formats\Tar\TarEntry.cs (65)
38
internal TarEntry(
TarEntryType
entryType, string entryName, TarEntryFormat format, bool isGea)
42
Debug.Assert(!isGea || entryType is
TarEntryType
.GlobalExtendedAttributes);
61
TarEntryType
compatibleEntryType = TarHelpers.GetCorrectTypeFlagForFormat(format, other.EntryType);
78
public
TarEntryType
EntryType => _header._typeFlag;
121
/// <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>
125
/// 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.
128
/// <exception cref="InvalidOperationException">The entry type is not <see cref="
TarEntryType
.HardLink"/> or <see cref="
TarEntryType
.SymbolicLink"/>.</exception>
136
if (_header._typeFlag is not
TarEntryType
.HardLink and not
TarEntryType
.SymbolicLink)
199
/// <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>
200
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para>
217
if (EntryType is
TarEntryType
.SymbolicLink or
TarEntryType
.HardLink or
TarEntryType
.GlobalExtendedAttributes)
232
/// <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>
233
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
252
if (EntryType is
TarEntryType
.SymbolicLink or
TarEntryType
.HardLink or
TarEntryType
.GlobalExtendedAttributes)
266
/// <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>
330
Debug.Assert(EntryType is
TarEntryType
.SymbolicLink);
336
if (EntryType ==
TarEntryType
.Directory)
362
Debug.Assert(EntryType is
TarEntryType
.SymbolicLink);
368
if (EntryType ==
TarEntryType
.Directory)
399
if (EntryType is
TarEntryType
.SymbolicLink)
425
else if (EntryType is
TarEntryType
.HardLink)
609
if (EntryType is
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile or
TarEntryType
.ContiguousFile)
628
if (EntryType is
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile or
TarEntryType
.ContiguousFile)
641
Debug.Assert(EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile or
TarEntryType
.ContiguousFile));
645
case
TarEntryType
.Directory:
646
case
TarEntryType
.DirectoryList:
662
case
TarEntryType
.SymbolicLink:
668
case
TarEntryType
.HardLink:
681
case
TarEntryType
.BlockDevice:
685
case
TarEntryType
.CharacterDevice:
689
case
TarEntryType
.Fifo:
693
case
TarEntryType
.ExtendedAttributes:
694
case
TarEntryType
.GlobalExtendedAttributes:
695
case
TarEntryType
.LongPath:
696
case
TarEntryType
.LongLink:
700
case
TarEntryType
.MultiVolume:
701
case
TarEntryType
.RenamedOrSymlinked:
702
case
TarEntryType
.SparseFile:
703
case
TarEntryType
.TapeVolume:
751
Debug.Assert(EntryType is
TarEntryType
.HardLink);
System\Formats\Tar\TarEntry.Unix.cs (3)
26
Debug.Assert(EntryType is
TarEntryType
.BlockDevice);
33
Debug.Assert(EntryType is
TarEntryType
.CharacterDevice);
40
Debug.Assert(EntryType is
TarEntryType
.Fifo);
System\Formats\Tar\TarFile.cs (42)
275
/// <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>
276
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
295
/// <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>
296
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
332
/// <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>
333
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
354
/// <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>
355
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
393
/// <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>
394
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
412
/// <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>
413
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
451
/// <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>
452
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
472
/// <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>
473
/// <para>Elevation is required to extract a <see cref="
TarEntryType
.BlockDevice"/> or <see cref="
TarEntryType
.CharacterDevice"/> to disk.</para></remarks>
651
if (entry.EntryType is not
TarEntryType
.GlobalExtendedAttributes)
700
if (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)
68
internal
TarEntryType
_typeFlag;
110
internal TarHeader(TarEntryFormat format, string name = "", int mode = 0, DateTimeOffset mTime = default,
TarEntryType
typeFlag =
TarEntryType
.RegularFile)
124
internal TarHeader(TarEntryFormat format,
TarEntryType
typeFlag, TarHeader other)
267
Debug.Assert(_typeFlag is
TarEntryType
.SymbolicLink or
TarEntryType
.HardLink);
System\Formats\Tar\TarHeader.Read.cs (38)
175
if (_typeFlag is
TarEntryType
.HardLink or
TarEntryType
.SymbolicLink &&
206
if (_typeFlag is
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile)
302
case
TarEntryType
.ExtendedAttributes or
TarEntryType
.GlobalExtendedAttributes:
305
case
TarEntryType
.LongLink or
TarEntryType
.LongPath:
308
case
TarEntryType
.BlockDevice:
309
case
TarEntryType
.CharacterDevice:
310
case
TarEntryType
.Directory:
311
case
TarEntryType
.Fifo:
312
case
TarEntryType
.HardLink:
313
case
TarEntryType
.SymbolicLink:
320
case
TarEntryType
.RegularFile:
321
case
TarEntryType
.V7RegularFile: // Treated as regular file
322
case
TarEntryType
.ContiguousFile: // Treated as regular file
323
case
TarEntryType
.DirectoryList: // Contains the list of filesystem entries in the data section
324
case
TarEntryType
.MultiVolume: // Contains portion of a file
325
case
TarEntryType
.RenamedOrSymlinked: // Might contain data
326
case
TarEntryType
.SparseFile: // Contains portion of a file
327
case
TarEntryType
.TapeVolume: // Might contain data
454
typeFlag: (
TarEntryType
)buffer[FieldLocations.TypeFlag])
467
TarEntryType
.ExtendedAttributes or
468
TarEntryType
.GlobalExtendedAttributes => TarEntryFormat.Pax,
470
TarEntryType
.DirectoryList or
471
TarEntryType
.LongLink or
472
TarEntryType
.LongPath or
473
TarEntryType
.MultiVolume or
474
TarEntryType
.RenamedOrSymlinked or
475
TarEntryType
.TapeVolume => TarEntryFormat.Gnu,
478
TarEntryType
.V7RegularFile => TarEntryFormat.V7,
480
TarEntryType
.SparseFile => throw new NotSupportedException(SR.Format(SR.TarEntryTypeNotSupported, header._typeFlag)),
484
_ => (header._typeFlag ==
TarEntryType
.RegularFile) ? TarEntryFormat.Ustar : TarEntryFormat.V7
607
if (_typeFlag is
TarEntryType
.CharacterDevice or
TarEntryType
.BlockDevice)
738
if (_typeFlag ==
TarEntryType
.LongLink)
742
else if (_typeFlag ==
TarEntryType
.LongPath)
System\Formats\Tar\TarHeader.Write.cs (19)
162
TarEntryType
actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.V7, _typeFlag);
172
TarEntryType
actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Ustar, _typeFlag);
199
Debug.Assert(_typeFlag is
TarEntryType
.GlobalExtendedAttributes);
264
Debug.Assert(_typeFlag is not
TarEntryType
.GlobalExtendedAttributes);
296
Debug.Assert(_typeFlag is not
TarEntryType
.GlobalExtendedAttributes);
419
return GetGnuLongMetadataHeader(dataStream,
TarEntryType
.LongLink);
425
return GetGnuLongMetadataHeader(dataStream,
TarEntryType
.LongPath);
429
private static TarHeader GetGnuLongMetadataHeader(MemoryStream dataStream,
TarEntryType
entryType)
431
Debug.Assert(entryType is
TarEntryType
.LongPath or
TarEntryType
.LongLink);
488
_typeFlag = isGea ?
TarEntryType
.GlobalExtendedAttributes :
TarEntryType
.ExtendedAttributes;
612
private int WriteCommonFields(Span<byte> buffer,
TarEntryType
actualEntryType)
615
Debug.Assert(!string.IsNullOrEmpty(_linkName) ^ (_typeFlag is not
TarEntryType
.SymbolicLink and not
TarEntryType
.HardLink));
750
if (_typeFlag is not
TarEntryType
.LongLink and not
TarEntryType
.LongPath)
1149
return _typeFlag is
TarEntryType
.Directory or
TarEntryType
.DirectoryList ?
System\Formats\Tar\TarHelpers.cs (38)
77
internal static int GetDefaultMode(
TarEntryType
type)
78
=> type is
TarEntryType
.Directory or
TarEntryType
.DirectoryList ? (int)DefaultDirectoryMode : (int)DefaultFileMode;
275
internal static
TarEntryType
GetRegularFileEntryTypeForFormat(TarEntryFormat format) => format is TarEntryFormat.V7 ?
TarEntryType
.V7RegularFile :
TarEntryType
.RegularFile;
280
internal static
TarEntryType
GetCorrectTypeFlagForFormat(TarEntryFormat format,
TarEntryType
entryType) =>
283
(TarEntryFormat.V7,
TarEntryType
.RegularFile) =>
TarEntryType
.V7RegularFile,
284
(not TarEntryFormat.V7,
TarEntryType
.V7RegularFile) =>
TarEntryType
.RegularFile,
405
internal static void ThrowIfEntryTypeNotSupported(
TarEntryType
entryType, TarEntryFormat archiveFormat, [CallerArgumentExpression(nameof(entryType))] string? paramName = null)
411
TarEntryType
.Directory or
412
TarEntryType
.HardLink or
413
TarEntryType
.V7RegularFile or
414
TarEntryType
.SymbolicLink)
422
TarEntryType
.BlockDevice or
423
TarEntryType
.CharacterDevice or
424
TarEntryType
.Directory or
425
TarEntryType
.Fifo or
426
TarEntryType
.HardLink or
427
TarEntryType
.RegularFile or
428
TarEntryType
.SymbolicLink)
436
TarEntryType
.BlockDevice or
437
TarEntryType
.CharacterDevice or
438
TarEntryType
.Directory or
439
TarEntryType
.Fifo or
440
TarEntryType
.HardLink or
441
TarEntryType
.RegularFile or
442
TarEntryType
.SymbolicLink)
454
TarEntryType
.BlockDevice or
455
TarEntryType
.CharacterDevice or
456
TarEntryType
.Directory or
457
TarEntryType
.Fifo or
458
TarEntryType
.HardLink or
459
TarEntryType
.RegularFile or
460
TarEntryType
.SymbolicLink)
System\Formats\Tar\TarReader.cs (19)
222
TarEntryFormat.Pax => header._typeFlag is
TarEntryType
.GlobalExtendedAttributes ?
262
if (header._typeFlag is
TarEntryType
.ExtendedAttributes)
272
else if (header._typeFlag is
TarEntryType
.LongLink or
TarEntryType
.LongPath)
299
if (actualHeader._typeFlag is
TarEntryType
.GlobalExtendedAttributes or
300
TarEntryType
.ExtendedAttributes or
301
TarEntryType
.LongLink or
302
TarEntryType
.LongPath)
304
throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag,
TarEntryType
.ExtendedAttributes));
337
if ((header._typeFlag is
TarEntryType
.LongLink && secondHeader._typeFlag is
TarEntryType
.LongPath) ||
338
(header._typeFlag is
TarEntryType
.LongPath && secondHeader._typeFlag is
TarEntryType
.LongLink))
348
if (thirdHeader._typeFlag is
TarEntryType
.LongLink or
TarEntryType
.LongPath)
353
if (header._typeFlag is
TarEntryType
.LongLink)
361
else if (header._typeFlag is
TarEntryType
.LongPath)
374
if (header._typeFlag is
TarEntryType
.LongLink)
379
else 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>
318
if (entry._header._typeFlag is
TarEntryType
.GlobalExtendedAttributes)
353
TarEntryFormat.Pax when entry._header._typeFlag is
TarEntryType
.GlobalExtendedAttributes => entry._header.WriteAsPaxGlobalExtendedAttributesCoreAsync<TAdapter>(_archiveStream, buffer, _nextGlobalExtendedAttributesEntryNumber++, cancellationToken),
407
private static void ValidateEntryLinkName(
TarEntryType
entryType, string? linkName)
409
if (entryType is
TarEntryType
.HardLink or
TarEntryType
.SymbolicLink)
419
private TarEntry CreateEntryForFormat(
TarEntryType
entryType, string entryName) =>
System\Formats\Tar\TarWriter.Unix.cs (14)
43
TarEntryType
entryType;
46
entryType =
TarEntryType
.HardLink;
53
Interop.Sys.FileTypes.S_IFBLK =>
TarEntryType
.BlockDevice,
54
Interop.Sys.FileTypes.S_IFCHR =>
TarEntryType
.CharacterDevice,
55
Interop.Sys.FileTypes.S_IFIFO =>
TarEntryType
.Fifo,
56
Interop.Sys.FileTypes.S_IFLNK =>
TarEntryType
.SymbolicLink,
58
Interop.Sys.FileTypes.S_IFDIR =>
TarEntryType
.Directory,
63
FileSystemInfo info = entryType is
TarEntryType
.Directory ? new DirectoryInfo(fullPath) : new FileInfo(fullPath);
67
if (entryType is
TarEntryType
.BlockDevice or
TarEntryType
.CharacterDevice)
110
if (entry.EntryType ==
TarEntryType
.SymbolicLink)
115
if (entry.EntryType ==
TarEntryType
.HardLink)
121
if (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>
32
public UstarTarEntry(
TarEntryType
entryType, string entryName)
58
internal 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>
27
public V7TarEntry(
TarEntryType
entryType, string entryName)
44
internal override bool IsDataStreamSetterSupported() => EntryType ==
TarEntryType
.V7RegularFile;