378 references to TarEntryType
aspire (6)
Bundles\BundleService.cs (3)
269
case
TarEntryType
.Directory:
273
case
TarEntryType
.RegularFile:
288
case
TarEntryType
.SymbolicLink:
Utils\ArchiveHelper.cs (3)
97
case
TarEntryType
.Directory:
101
case
TarEntryType
.RegularFile:
116
case
TarEntryType
.SymbolicLink:
Microsoft.DotNet.SignTool (5)
src\ZipData.cs (5)
66
.Where(static entry => entry.EntryType !=
TarEntryType
.SymbolicLink &&
67
entry.EntryType !=
TarEntryType
.Directory)
672
if (tar.EntryType ==
TarEntryType
.Directory ||
673
(skipSymlinks && tar.EntryType ==
TarEntryType
.SymbolicLink))
681
if (tar.EntryType ==
TarEntryType
.SymbolicLink)
System.Formats.Tar (367)
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 (62)
37
internal TarEntry(
TarEntryType
entryType, string entryName, TarEntryFormat format, bool isGea)
41
Debug.Assert(!isGea || entryType is
TarEntryType
.GlobalExtendedAttributes);
60
TarEntryType
compatibleEntryType = TarHelpers.GetCorrectTypeFlagForFormat(format, other.EntryType);
77
public
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>
135
if (_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>
216
if (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>
251
if (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>
324
if (EntryType ==
TarEntryType
.Directory)
347
if (EntryType ==
TarEntryType
.Directory)
377
if (EntryType is
TarEntryType
.SymbolicLink)
392
else if (EntryType is
TarEntryType
.HardLink)
427
if (EntryType is
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile or
TarEntryType
.ContiguousFile)
446
if (EntryType is
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile or
TarEntryType
.ContiguousFile)
459
Debug.Assert(EntryType is not (
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile or
TarEntryType
.ContiguousFile));
463
case
TarEntryType
.Directory:
464
case
TarEntryType
.DirectoryList:
480
case
TarEntryType
.SymbolicLink:
486
case
TarEntryType
.HardLink:
499
case
TarEntryType
.BlockDevice:
503
case
TarEntryType
.CharacterDevice:
507
case
TarEntryType
.Fifo:
511
case
TarEntryType
.ExtendedAttributes:
512
case
TarEntryType
.GlobalExtendedAttributes:
513
case
TarEntryType
.LongPath:
514
case
TarEntryType
.LongLink:
518
case
TarEntryType
.MultiVolume:
519
case
TarEntryType
.RenamedOrSymlinked:
520
case
TarEntryType
.SparseFile:
521
case
TarEntryType
.TapeVolume:
System\Formats\Tar\TarEntry.Unix.cs (4)
16
Debug.Assert(EntryType is
TarEntryType
.BlockDevice);
23
Debug.Assert(EntryType is
TarEntryType
.CharacterDevice);
30
Debug.Assert(EntryType is
TarEntryType
.Fifo);
37
Debug.Assert(EntryType is
TarEntryType
.HardLink);
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>
662
if (entry.EntryType is not
TarEntryType
.GlobalExtendedAttributes)
710
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)
65
internal
TarEntryType
_typeFlag;
107
internal TarHeader(TarEntryFormat format, string name = "", int mode = 0, DateTimeOffset mTime = default,
TarEntryType
typeFlag =
TarEntryType
.RegularFile)
121
internal TarHeader(TarEntryFormat format,
TarEntryType
typeFlag, TarHeader other)
258
Debug.Assert(_typeFlag is
TarEntryType
.SymbolicLink or
TarEntryType
.HardLink);
System\Formats\Tar\TarHeader.Read.cs (56)
133
if (_typeFlag is
TarEntryType
.HardLink or
TarEntryType
.SymbolicLink &&
159
if (_typeFlag is
TarEntryType
.RegularFile or
TarEntryType
.V7RegularFile)
235
case
TarEntryType
.ExtendedAttributes or
TarEntryType
.GlobalExtendedAttributes:
238
case
TarEntryType
.LongLink or
TarEntryType
.LongPath:
241
case
TarEntryType
.BlockDevice:
242
case
TarEntryType
.CharacterDevice:
243
case
TarEntryType
.Directory:
244
case
TarEntryType
.Fifo:
245
case
TarEntryType
.HardLink:
246
case
TarEntryType
.SymbolicLink:
253
case
TarEntryType
.RegularFile:
254
case
TarEntryType
.V7RegularFile: // Treated as regular file
255
case
TarEntryType
.ContiguousFile: // Treated as regular file
256
case
TarEntryType
.DirectoryList: // Contains the list of filesystem entries in the data section
257
case
TarEntryType
.MultiVolume: // Contains portion of a file
258
case
TarEntryType
.RenamedOrSymlinked: // Might contain data
259
case
TarEntryType
.SparseFile: // Contains portion of a file
260
case
TarEntryType
.TapeVolume: // Might contain data
308
case
TarEntryType
.ExtendedAttributes or
TarEntryType
.GlobalExtendedAttributes:
311
case
TarEntryType
.LongLink or
TarEntryType
.LongPath:
314
case
TarEntryType
.BlockDevice:
315
case
TarEntryType
.CharacterDevice:
316
case
TarEntryType
.Directory:
317
case
TarEntryType
.Fifo:
318
case
TarEntryType
.HardLink:
319
case
TarEntryType
.SymbolicLink:
326
case
TarEntryType
.RegularFile:
327
case
TarEntryType
.V7RegularFile: // Treated as regular file
328
case
TarEntryType
.ContiguousFile: // Treated as regular file
329
case
TarEntryType
.DirectoryList: // Contains the list of filesystem entries in the data section
330
case
TarEntryType
.MultiVolume: // Contains portion of a file
331
case
TarEntryType
.RenamedOrSymlinked: // Might contain data
332
case
TarEntryType
.SparseFile: // Contains portion of a file
333
case
TarEntryType
.TapeVolume: // Might contain data
473
typeFlag: (
TarEntryType
)buffer[FieldLocations.TypeFlag])
486
TarEntryType
.ExtendedAttributes or
487
TarEntryType
.GlobalExtendedAttributes => TarEntryFormat.Pax,
489
TarEntryType
.DirectoryList or
490
TarEntryType
.LongLink or
491
TarEntryType
.LongPath or
492
TarEntryType
.MultiVolume or
493
TarEntryType
.RenamedOrSymlinked or
494
TarEntryType
.TapeVolume => TarEntryFormat.Gnu,
497
TarEntryType
.V7RegularFile => TarEntryFormat.V7,
499
TarEntryType
.SparseFile => throw new NotSupportedException(SR.Format(SR.TarEntryTypeNotSupported, header._typeFlag)),
503
_ => (header._typeFlag ==
TarEntryType
.RegularFile) ? TarEntryFormat.Ustar : TarEntryFormat.V7
626
if (_typeFlag is
TarEntryType
.CharacterDevice or
TarEntryType
.BlockDevice)
800
if (_typeFlag ==
TarEntryType
.LongLink)
804
else if (_typeFlag ==
TarEntryType
.LongPath)
System\Formats\Tar\TarHeader.Write.cs (19)
175
TarEntryType
actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.V7, _typeFlag);
185
TarEntryType
actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Ustar, _typeFlag);
217
Debug.Assert(_typeFlag is
TarEntryType
.GlobalExtendedAttributes);
280
Debug.Assert(_typeFlag is not
TarEntryType
.GlobalExtendedAttributes);
323
Debug.Assert(_typeFlag is not
TarEntryType
.GlobalExtendedAttributes);
451
return GetGnuLongMetadataHeader(dataStream,
TarEntryType
.LongLink);
457
return GetGnuLongMetadataHeader(dataStream,
TarEntryType
.LongPath);
461
private static TarHeader GetGnuLongMetadataHeader(MemoryStream dataStream,
TarEntryType
entryType)
463
Debug.Assert(entryType is
TarEntryType
.LongPath or
TarEntryType
.LongLink);
521
_typeFlag = isGea ?
TarEntryType
.GlobalExtendedAttributes :
TarEntryType
.ExtendedAttributes;
645
private int WriteCommonFields(Span<byte> buffer,
TarEntryType
actualEntryType)
648
Debug.Assert(!string.IsNullOrEmpty(_linkName) ^ (_typeFlag is not
TarEntryType
.SymbolicLink and not
TarEntryType
.HardLink));
790
if (_typeFlag is not
TarEntryType
.LongLink and not
TarEntryType
.LongPath)
1171
return _typeFlag is
TarEntryType
.Directory or
TarEntryType
.DirectoryList ?
System\Formats\Tar\TarHelpers.cs (38)
48
internal static int GetDefaultMode(
TarEntryType
type)
49
=> type is
TarEntryType
.Directory or
TarEntryType
.DirectoryList ? (int)DefaultDirectoryMode : (int)DefaultFileMode;
198
internal static
TarEntryType
GetRegularFileEntryTypeForFormat(TarEntryFormat format) => format is TarEntryFormat.V7 ?
TarEntryType
.V7RegularFile :
TarEntryType
.RegularFile;
203
internal static
TarEntryType
GetCorrectTypeFlagForFormat(TarEntryFormat format,
TarEntryType
entryType)
207
if (entryType is
TarEntryType
.RegularFile)
209
return
TarEntryType
.V7RegularFile;
212
else if (entryType is
TarEntryType
.V7RegularFile)
214
return
TarEntryType
.RegularFile;
316
internal static void ThrowIfEntryTypeNotSupported(
TarEntryType
entryType, TarEntryFormat archiveFormat, [CallerArgumentExpression(nameof(entryType))] string? paramName = null)
322
TarEntryType
.Directory or
323
TarEntryType
.HardLink or
324
TarEntryType
.V7RegularFile or
325
TarEntryType
.SymbolicLink)
333
TarEntryType
.BlockDevice or
334
TarEntryType
.CharacterDevice or
335
TarEntryType
.Directory or
336
TarEntryType
.Fifo or
337
TarEntryType
.HardLink or
338
TarEntryType
.RegularFile or
339
TarEntryType
.SymbolicLink)
347
TarEntryType
.BlockDevice or
348
TarEntryType
.CharacterDevice or
349
TarEntryType
.Directory or
350
TarEntryType
.Fifo or
351
TarEntryType
.HardLink or
352
TarEntryType
.RegularFile or
353
TarEntryType
.SymbolicLink)
365
TarEntryType
.BlockDevice or
366
TarEntryType
.CharacterDevice or
367
TarEntryType
.Directory or
368
TarEntryType
.Fifo or
369
TarEntryType
.HardLink or
370
TarEntryType
.RegularFile or
371
TarEntryType
.SymbolicLink)
System\Formats\Tar\TarReader.cs (41)
138
TarEntryFormat.Pax => header._typeFlag is
TarEntryType
.GlobalExtendedAttributes ?
273
TarEntryFormat.Pax => header._typeFlag is
TarEntryType
.GlobalExtendedAttributes ?
313
if (header._typeFlag is
TarEntryType
.ExtendedAttributes)
322
else if (header._typeFlag is
TarEntryType
.LongLink or
TarEntryType
.LongPath)
354
if (header._typeFlag is
TarEntryType
.ExtendedAttributes)
364
else if (header._typeFlag is
TarEntryType
.LongLink or
TarEntryType
.LongPath)
391
if (actualHeader._typeFlag is
TarEntryType
.GlobalExtendedAttributes or
392
TarEntryType
.ExtendedAttributes or
393
TarEntryType
.LongLink or
394
TarEntryType
.LongPath)
396
throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag,
TarEntryType
.ExtendedAttributes));
423
if (actualHeader._typeFlag is
TarEntryType
.GlobalExtendedAttributes or
424
TarEntryType
.ExtendedAttributes or
425
TarEntryType
.LongLink or
426
TarEntryType
.LongPath)
428
throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag,
TarEntryType
.ExtendedAttributes));
432
if (actualHeader._typeFlag is
TarEntryType
.ExtendedAttributes)
434
throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry,
TarEntryType
.ExtendedAttributes,
TarEntryType
.ExtendedAttributes));
467
if ((header._typeFlag is
TarEntryType
.LongLink && secondHeader._typeFlag is
TarEntryType
.LongPath) ||
468
(header._typeFlag is
TarEntryType
.LongPath && secondHeader._typeFlag is
TarEntryType
.LongLink))
479
if (thirdHeader._typeFlag is
TarEntryType
.LongLink or
TarEntryType
.LongPath)
484
if (header._typeFlag is
TarEntryType
.LongLink)
492
else if (header._typeFlag is
TarEntryType
.LongPath)
505
if (header._typeFlag is
TarEntryType
.LongLink)
510
else if (header._typeFlag is
TarEntryType
.LongPath)
544
if ((header._typeFlag is
TarEntryType
.LongLink && secondHeader._typeFlag is
TarEntryType
.LongPath) ||
545
(header._typeFlag is
TarEntryType
.LongPath && secondHeader._typeFlag is
TarEntryType
.LongLink))
555
if (thirdHeader._typeFlag is
TarEntryType
.LongLink or
TarEntryType
.LongPath)
560
if (header._typeFlag is
TarEntryType
.LongLink)
568
else if (header._typeFlag is
TarEntryType
.LongPath)
581
if (header._typeFlag is
TarEntryType
.LongLink)
586
else if (header._typeFlag is
TarEntryType
.LongPath)
System\Formats\Tar\TarWriter.cs (31)
230
/// <item><see cref="
TarEntryType
.Directory"/></item>
231
/// <item><see cref="
TarEntryType
.HardLink"/></item>
232
/// <item><see cref="
TarEntryType
.SymbolicLink"/></item>
233
/// <item><see cref="
TarEntryType
.V7RegularFile"/></item>
239
/// <item><see cref="
TarEntryType
.BlockDevice"/></item>
240
/// <item><see cref="
TarEntryType
.CharacterDevice"/></item>
241
/// <item><see cref="
TarEntryType
.Directory"/></item>
242
/// <item><see cref="
TarEntryType
.Fifo"/></item>
243
/// <item><see cref="
TarEntryType
.HardLink"/></item>
244
/// <item><see cref="
TarEntryType
.RegularFile"/></item>
245
/// <item><see cref="
TarEntryType
.SymbolicLink"/></item>
250
/// <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>
278
/// <item><see cref="
TarEntryType
.Directory"/></item>
279
/// <item><see cref="
TarEntryType
.HardLink"/></item>
280
/// <item><see cref="
TarEntryType
.SymbolicLink"/></item>
281
/// <item><see cref="
TarEntryType
.V7RegularFile"/></item>
287
/// <item><see cref="
TarEntryType
.BlockDevice"/></item>
288
/// <item><see cref="
TarEntryType
.CharacterDevice"/></item>
289
/// <item><see cref="
TarEntryType
.Directory"/></item>
290
/// <item><see cref="
TarEntryType
.Fifo"/></item>
291
/// <item><see cref="
TarEntryType
.HardLink"/></item>
292
/// <item><see cref="
TarEntryType
.RegularFile"/></item>
293
/// <item><see cref="
TarEntryType
.SymbolicLink"/></item>
298
/// <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>
333
if (entry._header._typeFlag is
TarEntryType
.GlobalExtendedAttributes)
368
TarEntryFormat.Pax when entry._header._typeFlag is
TarEntryType
.GlobalExtendedAttributes => entry._header.WriteAsPaxGlobalExtendedAttributesAsync(_archiveStream, buffer, _nextGlobalExtendedAttributesEntryNumber++, cancellationToken),
425
private static void ValidateEntryLinkName(
TarEntryType
entryType, string? linkName)
427
if (entryType is
TarEntryType
.HardLink or
TarEntryType
.SymbolicLink)
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);
74
if (entryType is
TarEntryType
.BlockDevice or
TarEntryType
.CharacterDevice)
117
if (entry.EntryType ==
TarEntryType
.SymbolicLink)
122
if (entry.EntryType ==
TarEntryType
.HardLink)
128
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;