-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathTarFile.xml
More file actions
407 lines (391 loc) · 35.6 KB
/
Copy pathTarFile.xml
File metadata and controls
407 lines (391 loc) · 35.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
<Type Name="TarFile" FullName="System.Formats.Tar.TarFile">
<TypeSignature Language="C#" Value="public static class TarFile" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit TarFile extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Formats.Tar.TarFile" />
<TypeSignature Language="VB.NET" Value="Public Class TarFile" />
<TypeSignature Language="F#" Value="type TarFile = class" />
<TypeSignature Language="C++ CLI" Value="public ref class TarFile abstract sealed" />
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="net-10.0;net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides static methods for creating and extracting tar archives.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="CreateFromDirectory">
<MemberSignature Language="C#" Value="public static void CreateFromDirectory (string sourceDirectoryName, System.IO.Stream destination, bool includeBaseDirectory);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void CreateFromDirectory(string sourceDirectoryName, class System.IO.Stream destination, bool includeBaseDirectory) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Formats.Tar.TarFile.CreateFromDirectory(System.String,System.IO.Stream,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub CreateFromDirectory (sourceDirectoryName As String, destination As Stream, includeBaseDirectory As Boolean)" />
<MemberSignature Language="F#" Value="static member CreateFromDirectory : string * System.IO.Stream * bool -> unit" Usage="System.Formats.Tar.TarFile.CreateFromDirectory (sourceDirectoryName, destination, includeBaseDirectory)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void CreateFromDirectory(System::String ^ sourceDirectoryName, System::IO::Stream ^ destination, bool includeBaseDirectory);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceDirectoryName" Type="System.String" />
<Parameter Name="destination" Type="System.IO.Stream" />
<Parameter Name="includeBaseDirectory" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="sourceDirectoryName">The path of the directory to archive.</param>
<param name="destination">The destination stream for the archive.</param>
<param name="includeBaseDirectory">
<see langword="true" /> to include the base directory name as the first segment in all the names of the archive entries. <see langword="false" /> to exclude the base directory name from the archive entry names.</param>
<summary>Creates a tar stream that contains all the filesystem entries from the specified directory.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="sourceDirectoryName" /> or <paramref name="destination" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="sourceDirectoryName" /> is empty.
-or-
<paramref name="destination" /> does not support writing.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The <paramref name="sourceDirectoryName" /> directory path is not found.</exception>
<exception cref="T:System.IO.IOException">An I/O exception occurred.</exception>
</Docs>
</Member>
<Member MemberName="CreateFromDirectory">
<MemberSignature Language="C#" Value="public static void CreateFromDirectory (string sourceDirectoryName, string destinationFileName, bool includeBaseDirectory);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void CreateFromDirectory(string sourceDirectoryName, string destinationFileName, bool includeBaseDirectory) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Formats.Tar.TarFile.CreateFromDirectory(System.String,System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub CreateFromDirectory (sourceDirectoryName As String, destinationFileName As String, includeBaseDirectory As Boolean)" />
<MemberSignature Language="F#" Value="static member CreateFromDirectory : string * string * bool -> unit" Usage="System.Formats.Tar.TarFile.CreateFromDirectory (sourceDirectoryName, destinationFileName, includeBaseDirectory)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void CreateFromDirectory(System::String ^ sourceDirectoryName, System::String ^ destinationFileName, bool includeBaseDirectory);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceDirectoryName" Type="System.String" />
<Parameter Name="destinationFileName" Type="System.String" />
<Parameter Name="includeBaseDirectory" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="sourceDirectoryName">The path of the directory to archive.</param>
<param name="destinationFileName">The path of the destination archive file.</param>
<param name="includeBaseDirectory">
<see langword="true" /> to include the base directory name as the first path segment in all the names of the archive entries. <see langword="false" /> to exclude the base directory name from the entry name paths.</param>
<summary>Creates a tar file that contains all the filesystem entries from the specified directory.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="sourceDirectoryName" /> or <paramref name="destinationFileName" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="sourceDirectoryName" /> or <paramref name="destinationFileName" /> is empty.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The <paramref name="sourceDirectoryName" /> directory path is not found.</exception>
<exception cref="T:System.IO.IOException">An I/O exception occurred.</exception>
</Docs>
</Member>
<Member MemberName="CreateFromDirectoryAsync">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task CreateFromDirectoryAsync (string sourceDirectoryName, System.IO.Stream destination, bool includeBaseDirectory, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task CreateFromDirectoryAsync(string sourceDirectoryName, class System.IO.Stream destination, bool includeBaseDirectory, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Formats.Tar.TarFile.CreateFromDirectoryAsync(System.String,System.IO.Stream,System.Boolean,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateFromDirectoryAsync (sourceDirectoryName As String, destination As Stream, includeBaseDirectory As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task" />
<MemberSignature Language="F#" Value="static member CreateFromDirectoryAsync : string * System.IO.Stream * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task" Usage="System.Formats.Tar.TarFile.CreateFromDirectoryAsync (sourceDirectoryName, destination, includeBaseDirectory, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceDirectoryName" Type="System.String" />
<Parameter Name="destination" Type="System.IO.Stream" />
<Parameter Name="includeBaseDirectory" Type="System.Boolean" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="sourceDirectoryName">The path of the directory to archive.</param>
<param name="destination">The destination stream of the archive.</param>
<param name="includeBaseDirectory">
<see langword="true" /> to include the base directory name as the first path segment in all the names of the archive entries. <see langword="false" /> to exclude the base directory name from the entry name paths.</param>
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
<summary>Asynchronously creates a tar stream that contains all the filesystem entries from the specified directory.</summary>
<returns>A task that represents the asynchronous creation operation.</returns>
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.Formats.Tar.TarFile.CreateFromDirectory(System.String,System.IO.Stream,System.Boolean)" />.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="sourceDirectoryName" /> or <paramref name="destination" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="sourceDirectoryName" /> is empty.
-or-
<paramref name="destination" /> does not support writing.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The <paramref name="sourceDirectoryName" /> directory path is not found.</exception>
<exception cref="T:System.IO.IOException">An I/O exception occurred.</exception>
<exception cref="T:System.OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
</Docs>
</Member>
<Member MemberName="CreateFromDirectoryAsync">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task CreateFromDirectoryAsync (string sourceDirectoryName, string destinationFileName, bool includeBaseDirectory, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task CreateFromDirectoryAsync(string sourceDirectoryName, string destinationFileName, bool includeBaseDirectory, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Formats.Tar.TarFile.CreateFromDirectoryAsync(System.String,System.String,System.Boolean,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateFromDirectoryAsync (sourceDirectoryName As String, destinationFileName As String, includeBaseDirectory As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task" />
<MemberSignature Language="F#" Value="static member CreateFromDirectoryAsync : string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task" Usage="System.Formats.Tar.TarFile.CreateFromDirectoryAsync (sourceDirectoryName, destinationFileName, includeBaseDirectory, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceDirectoryName" Type="System.String" />
<Parameter Name="destinationFileName" Type="System.String" />
<Parameter Name="includeBaseDirectory" Type="System.Boolean" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="sourceDirectoryName">The path of the directory to archive.</param>
<param name="destinationFileName">The path of the destination archive file.</param>
<param name="includeBaseDirectory">
<see langword="true" /> to include the base directory name as the first path segment in all the names of the archive entries. <see langword="false" /> to exclude the base directory name from the entry name paths.</param>
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
<summary>Asynchronously creates a tar archive from the contents of the specified directory, and outputs them into the specified path. Can optionally include the base directory as the prefix for the entry names.</summary>
<returns>A task that represents the asynchronous creation operation.</returns>
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.Formats.Tar.TarFile.CreateFromDirectory(System.String,System.String,System.Boolean)" />.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="sourceDirectoryName" /> or <paramref name="destinationFileName" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="sourceDirectoryName" /> or <paramref name="destinationFileName" /> is empty.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The <paramref name="sourceDirectoryName" /> directory path is not found.</exception>
<exception cref="T:System.IO.IOException">An I/O exception occurred.</exception>
<exception cref="T:System.OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
</Docs>
</Member>
<Member MemberName="ExtractToDirectory">
<MemberSignature Language="C#" Value="public static void ExtractToDirectory (System.IO.Stream source, string destinationDirectoryName, bool overwriteFiles);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void ExtractToDirectory(class System.IO.Stream source, string destinationDirectoryName, bool overwriteFiles) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Formats.Tar.TarFile.ExtractToDirectory(System.IO.Stream,System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub ExtractToDirectory (source As Stream, destinationDirectoryName As String, overwriteFiles As Boolean)" />
<MemberSignature Language="F#" Value="static member ExtractToDirectory : System.IO.Stream * string * bool -> unit" Usage="System.Formats.Tar.TarFile.ExtractToDirectory (source, destinationDirectoryName, overwriteFiles)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void ExtractToDirectory(System::IO::Stream ^ source, System::String ^ destinationDirectoryName, bool overwriteFiles);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.IO.Stream" />
<Parameter Name="destinationDirectoryName" Type="System.String" />
<Parameter Name="overwriteFiles" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="source">The stream containing the tar archive.</param>
<param name="destinationDirectoryName">The path of the destination directory where the filesystem entries should be extracted.</param>
<param name="overwriteFiles">
<see langword="true" /> to overwrite files and directories in <paramref name="destinationDirectoryName" />; <see langword="false" /> to avoid overwriting, and throw if any files or directories are found with existing names.</param>
<summary>Extracts the contents of a stream that represents a tar archive into the specified directory.</summary>
<remarks>
<para>If a symbolic link or junction in the tar archive results in a file being extracted outside the specified <paramref name="destinationDirectoryName" />, an <see cref="T:System.IO.IOException" /> is thrown to ensure extraction remains within the same directory.</para>
<para>If <paramref name="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
<para>Files of type <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <see cref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
<para>Elevation is required to extract a <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> or <paramref name="destinationDirectoryName" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The <paramref name="destinationDirectoryName" /> directory path is not found.</exception>
<exception cref="T:System.UnauthorizedAccessException">Permissions are insufficient.</exception>
<exception cref="T:System.ArgumentException">
Extracting one of the tar entries would have resulted in a file outside the specified destination directory.
-or-
<paramref name="destinationDirectoryName" /> is empty.
-or-
<paramref name="source" /> does not support reading.</exception>
<exception cref="T:System.IO.IOException">An I/O exception occurred.</exception>
</Docs>
</Member>
<Member MemberName="ExtractToDirectory">
<MemberSignature Language="C#" Value="public static void ExtractToDirectory (string sourceFileName, string destinationDirectoryName, bool overwriteFiles);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void ExtractToDirectory(string sourceFileName, string destinationDirectoryName, bool overwriteFiles) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Formats.Tar.TarFile.ExtractToDirectory(System.String,System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub ExtractToDirectory (sourceFileName As String, destinationDirectoryName As String, overwriteFiles As Boolean)" />
<MemberSignature Language="F#" Value="static member ExtractToDirectory : string * string * bool -> unit" Usage="System.Formats.Tar.TarFile.ExtractToDirectory (sourceFileName, destinationDirectoryName, overwriteFiles)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void ExtractToDirectory(System::String ^ sourceFileName, System::String ^ destinationDirectoryName, bool overwriteFiles);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceFileName" Type="System.String" />
<Parameter Name="destinationDirectoryName" Type="System.String" />
<Parameter Name="overwriteFiles" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="sourceFileName">The path of the tar file to extract.</param>
<param name="destinationDirectoryName">The path of the destination directory where the filesystem entries should be extracted.</param>
<param name="overwriteFiles">
<see langword="true" /> to overwrite files and directories in <paramref name="destinationDirectoryName" />; <see langword="false" /> to avoid overwriting, and throw if any files or directories are found with existing names.</param>
<summary>Extracts the contents of a tar file into the specified directory.</summary>
<remarks>
<para>If a symbolic link or junction in the tar archive results in a file being extracted outside the specified <paramref name="destinationDirectoryName" />, an <see cref="T:System.IO.IOException" /> is thrown to ensure extraction remains within the same directory.</para>
<para>If <paramref name="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
<para>Files of type <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <see cref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
<para>Elevation is required to extract a <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="sourceFileName" /> or <paramref name="destinationDirectoryName" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The <paramref name="destinationDirectoryName" /> directory path is not found.</exception>
<exception cref="T:System.IO.FileNotFoundException">The <paramref name="sourceFileName" /> file path is not found.</exception>
<exception cref="T:System.UnauthorizedAccessException">Permissions are insufficient.</exception>
<exception cref="T:System.ArgumentException">
Extracting one of the tar entries would have resulted in a file outside the specified destination directory.
-or-
<paramref name="sourceFileName" /> or <paramref name="destinationDirectoryName" /> is empty.</exception>
<exception cref="T:System.IO.IOException">An I/O exception occurred.</exception>
</Docs>
</Member>
<Member MemberName="ExtractToDirectoryAsync">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task ExtractToDirectoryAsync (System.IO.Stream source, string destinationDirectoryName, bool overwriteFiles, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task ExtractToDirectoryAsync(class System.IO.Stream source, string destinationDirectoryName, bool overwriteFiles, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Formats.Tar.TarFile.ExtractToDirectoryAsync(System.IO.Stream,System.String,System.Boolean,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function ExtractToDirectoryAsync (source As Stream, destinationDirectoryName As String, overwriteFiles As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task" />
<MemberSignature Language="F#" Value="static member ExtractToDirectoryAsync : System.IO.Stream * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task" Usage="System.Formats.Tar.TarFile.ExtractToDirectoryAsync (source, destinationDirectoryName, overwriteFiles, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.IO.Stream" />
<Parameter Name="destinationDirectoryName" Type="System.String" />
<Parameter Name="overwriteFiles" Type="System.Boolean" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="source">The stream containing the tar archive.</param>
<param name="destinationDirectoryName">The path of the destination directory where the filesystem entries should be extracted.</param>
<param name="overwriteFiles">
<see langword="true" /> to overwrite files and directories in <paramref name="destinationDirectoryName" />; <see langword="false" /> to avoid overwriting, and throw if any files or directories are found with existing names.</param>
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
<summary>Asynchronously extracts the contents of a stream that represents a tar archive into the specified directory.</summary>
<returns>A task that represents the asynchronous extraction operation.</returns>
<remarks>
<para>If a symbolic link or junction in the tar archive results in a file being extracted outside the specified <paramref name="destinationDirectoryName" />, an <see cref="T:System.IO.IOException" /> is thrown to ensure extraction remains within the same directory.</para>
<para>If <paramref name="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
<para>Files of type <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <see cref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
<para>Elevation is required to extract a <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
<para>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.Formats.Tar.TarFile.ExtractToDirectory(System.IO.Stream,System.String,System.Boolean)" />.</para>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> or <paramref name="destinationDirectoryName" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The <paramref name="destinationDirectoryName" /> directory path is not found.</exception>
<exception cref="T:System.UnauthorizedAccessException">Permissions are insufficient.</exception>
<exception cref="T:System.ArgumentException">
Extracting one of the tar entries would have resulted in a file outside the specified destination directory.
-or-
<paramref name="destinationDirectoryName" /> is empty.
-or-
<paramref name="source" /> does not support reading.</exception>
<exception cref="T:System.IO.IOException">An I/O exception occurred.</exception>
<exception cref="T:System.OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
</Docs>
</Member>
<Member MemberName="ExtractToDirectoryAsync">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task ExtractToDirectoryAsync (string sourceFileName, string destinationDirectoryName, bool overwriteFiles, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task ExtractToDirectoryAsync(string sourceFileName, string destinationDirectoryName, bool overwriteFiles, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Formats.Tar.TarFile.ExtractToDirectoryAsync(System.String,System.String,System.Boolean,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function ExtractToDirectoryAsync (sourceFileName As String, destinationDirectoryName As String, overwriteFiles As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task" />
<MemberSignature Language="F#" Value="static member ExtractToDirectoryAsync : string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task" Usage="System.Formats.Tar.TarFile.ExtractToDirectoryAsync (sourceFileName, destinationDirectoryName, overwriteFiles, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Formats.Tar</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceFileName" Type="System.String" />
<Parameter Name="destinationDirectoryName" Type="System.String" />
<Parameter Name="overwriteFiles" Type="System.Boolean" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="sourceFileName">The path of the tar file to extract.</param>
<param name="destinationDirectoryName">The path of the destination directory where the filesystem entries should be extracted.</param>
<param name="overwriteFiles">
<see langword="true" /> to overwrite files and directories in <paramref name="destinationDirectoryName" />; <see langword="false" /> to avoid overwriting, and throw if any files or directories are found with existing names.</param>
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
<summary>Asynchronously extracts the contents of a tar file into the specified directory.</summary>
<returns>A task that represents the asynchronous extraction operation.</returns>
<remarks>
<para>If a symbolic link or junction in the tar archive results in a file being extracted outside the specified <paramref name="destinationDirectoryName" />, an <see cref="T:System.IO.IOException" /> is thrown to ensure extraction remains within the same directory.</para>
<para>If <paramref name="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
<para>Files of type <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <see cref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
<para>Elevation is required to extract a <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
<para>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.Formats.Tar.TarFile.ExtractToDirectory(System.String,System.String,System.Boolean)" />.</para>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="sourceFileName" /> or <paramref name="destinationDirectoryName" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The <paramref name="destinationDirectoryName" /> directory path is not found.</exception>
<exception cref="T:System.IO.FileNotFoundException">The <paramref name="sourceFileName" /> file path is not found.</exception>
<exception cref="T:System.UnauthorizedAccessException">Permissions are insufficient.</exception>
<exception cref="T:System.ArgumentException">
Extracting one of the tar entries would have resulted in a file outside the specified destination directory.
-or-
<paramref name="sourceFileName" /> or <paramref name="destinationDirectoryName" /> is empty.</exception>
<exception cref="T:System.IO.IOException">An I/O exception occurred.</exception>
<exception cref="T:System.OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
</Docs>
</Member>
</Members>
</Type>