2 types derived from TarEntry
System.Formats.Tar (2)
System\Formats\Tar\PosixTarEntry.cs (1)
13
public abstract partial class PosixTarEntry :
TarEntry
System\Formats\Tar\V7TarEntry.cs (1)
9
public sealed class V7TarEntry :
TarEntry
51 references to TarEntry
sdk-tasks (1)
ExtractArchiveToDirectory.cs (1)
120
while (tr.GetNextEntry() is
TarEntry
tarEntry)
System.Formats.Tar (50)
System\Formats\Tar\GnuTarEntry.cs (1)
50
public GnuTarEntry(
TarEntry
other)
System\Formats\Tar\PaxTarEntry.cs (6)
88
public PaxTarEntry(
TarEntry
other)
117
/// <para>Setting properties such as <see cref="
TarEntry
.Name"/>, <see cref="
TarEntry
.ModificationTime"/>, <see cref="
TarEntry
.Uid"/>, <see cref="
TarEntry
.Gid"/>, <see cref="PosixTarEntry.UserName"/>, <see cref="PosixTarEntry.GroupName"/>, <see cref="
TarEntry
.LinkName"/>, <see cref="PosixTarEntry.DeviceMajor"/>, or <see cref="PosixTarEntry.DeviceMinor"/> will update the corresponding extended attribute to keep properties and extended attributes synchronized.</para>
System\Formats\Tar\PosixTarEntry.cs (1)
32
internal PosixTarEntry(
TarEntry
other, TarEntryFormat format)
System\Formats\Tar\TarEntry.cs (2)
53
internal TarEntry(
TarEntry
other, TarEntryFormat format)
264
/// <remarks>If you write data to this data stream, make sure to rewind it to the desired start position before writing this entry into an archive using <see cref="TarWriter.WriteEntry(
TarEntry
)"/>.</remarks>
System\Formats\Tar\TarFile.cs (2)
659
TarEntry
? entry;
707
TarEntry
? entry;
System\Formats\Tar\TarHeader.Write.cs (4)
377
throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(
TarEntry
.Name)), ArgNameEntry);
398
throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(
TarEntry
.Name)), ArgNameEntry);
451
throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(
TarEntry
.Name)), ArgNameEntry);
497
throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(
TarEntry
.LinkName)), ArgNameEntry);
System\Formats\Tar\TarReader.cs (21)
19
private
TarEntry
? _previouslyReadEntry;
29
/// <param name="leaveOpen"><see langword="false"/> to dispose the <paramref name="archiveStream"/> when this instance is disposed, as well as all the non-null <see cref="
TarEntry
.DataStream"/> instances from the entries that were visited by this reader; <see langword="true"/> to leave all the streams open.</param>
50
/// Disposes the current <see cref="TarReader"/> instance, closes the archive stream, and disposes the non-null <see cref="
TarEntry
.DataStream"/> instances of all the entries that were read from the archive if the <c>leaveOpen</c> argument was set to <see langword="false"/> in the constructor.
52
/// <remarks>The <see cref="
TarEntry
.DataStream"/> property of any entry can be replaced with a new stream. If the user decides to replace it on a <see cref="
TarEntry
"/> instance that was obtained using a <see cref="TarReader"/>, the underlying stream gets disposed immediately, freeing the <see cref="TarReader"/> of origin from the responsibility of having to dispose it.</remarks>
61
/// Asynchronously disposes the current <see cref="TarReader"/> instance, and disposes the non-null <see cref="
TarEntry
.DataStream"/> instances of all the entries that were read from the archive.
63
/// <remarks>The <see cref="
TarEntry
.DataStream"/> property of any entry can be replaced with a new stream. If the user decides to replace it on a <see cref="
TarEntry
"/> instance that was obtained using a <see cref="TarReader"/>, the underlying stream gets disposed immediately, freeing the <see cref="TarReader"/> of origin from the responsibility of having to dispose it.</remarks>
92
/// <para>Set it to <see langword="false"/> if the data should not be copied into a new stream. If the underlying stream is unseekable, the user has the responsibility of reading and processing the <see cref="
TarEntry
.DataStream"/> immediately after calling this method.</para>
94
/// <returns>A <see cref="
TarEntry
"/> instance if a valid entry was found, or <see langword="null"/> if the end of the archive has been reached.</returns>
103
public
TarEntry
? GetNextEntry(bool copyData = false)
119
ValueTask<
TarEntry
?> vt = GetNextEntryCoreAsync<SyncReadWriteAdapter>(copyData, CancellationToken.None);
128
/// <para>Set it to <see langword="false"/> if the data should not be copied into a new stream. If the underlying stream is unseekable, the user has the responsibility of reading and processing the <see cref="
TarEntry
.DataStream"/> immediately after calling this method.</para>
131
/// <returns>A value task containing a <see cref="
TarEntry
"/> instance if a valid entry was found, or <see langword="null"/> if the end of the archive has been reached.</returns>
140
public ValueTask<
TarEntry
?> GetNextEntryAsync(bool copyData = false, CancellationToken cancellationToken = default)
144
return ValueTask.FromCanceled<
TarEntry
?>(cancellationToken);
150
return ValueTask.FromResult<
TarEntry
?>(null);
158
return ValueTask.FromResult<
TarEntry
?>(null);
208
private async ValueTask<
TarEntry
?> GetNextEntryCoreAsync<TAdapter>(bool copyData, CancellationToken cancellationToken)
216
TarEntry
entry = header._format switch
389
private void PreserveDataStreamForDisposalIfNeeded(
TarEntry
entry)
System\Formats\Tar\TarWriter.cs (9)
197
TarEntry
entry = ConstructEntryForWriting(fullPath, entryName, fileOptions);
210
/// <remarks><para>Before writing an entry to the archive, if you wrote data into the entry's <see cref="
TarEntry
.DataStream"/>, make sure to rewind it to the desired start position.</para>
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>
244
public void WriteEntry(
TarEntry
entry)
261
/// <remarks><para>Before writing an entry to the archive, if you wrote data into the entry's <see cref="
TarEntry
.DataStream"/>, make sure to rewind it to the desired start position.</para>
287
/// <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>
291
public Task WriteEntryAsync(
TarEntry
entry, CancellationToken cancellationToken = default)
306
private async ValueTask WriteEntryCoreAsync<TAdapter>(
TarEntry
entry, CancellationToken cancellationToken)
364
private void ValidateStreamsSeekability(
TarEntry
entry)
System\Formats\Tar\TarWriter.Unix.cs (2)
18
private
TarEntry
ConstructEntryForWriting(string fullPath, string entryName, FileOptions fileOptions)
65
TarEntry
entry = Format switch
System\Formats\Tar\UstarTarEntry.cs (1)
44
public UstarTarEntry(
TarEntry
other)
System\Formats\Tar\V7TarEntry.cs (1)
38
public V7TarEntry(
TarEntry
other)