|
1 | | -using System.IO.Compression; |
| 1 | +using System.IO; |
| 2 | +using System.IO.Compression; |
2 | 3 | using System.Text; |
3 | 4 |
|
4 | 5 | namespace Testably.Abstractions; |
5 | 6 |
|
6 | 7 | /// <inheritdoc cref="ZipFile" /> |
7 | 8 | public interface IZipFile : IFileSystemEntity |
8 | 9 | { |
| 10 | +#if FEATURE_COMPRESSION_STREAM |
| 11 | + /// <inheritdoc cref="ZipFile.CreateFromDirectory(string, Stream)" /> |
| 12 | + void CreateFromDirectory( |
| 13 | + string sourceDirectoryName, |
| 14 | + Stream destination); |
| 15 | + |
| 16 | + /// <inheritdoc cref="ZipFile.CreateFromDirectory(string, Stream, CompressionLevel, bool)" /> |
| 17 | + void CreateFromDirectory( |
| 18 | + string sourceDirectoryName, |
| 19 | + Stream destination, |
| 20 | + CompressionLevel compressionLevel, |
| 21 | + bool includeBaseDirectory); |
| 22 | + |
| 23 | + /// <inheritdoc cref="ZipFile.CreateFromDirectory(string, Stream, CompressionLevel, bool, Encoding)" /> |
| 24 | + void CreateFromDirectory( |
| 25 | + string sourceDirectoryName, |
| 26 | + Stream destination, |
| 27 | + CompressionLevel compressionLevel, |
| 28 | + bool includeBaseDirectory, |
| 29 | + Encoding entryNameEncoding); |
| 30 | +#endif |
| 31 | + |
9 | 32 | /// <inheritdoc cref="ZipFile.CreateFromDirectory(string, string)" /> |
10 | | - void CreateFromDirectory(string sourceDirectoryName, |
| 33 | + void CreateFromDirectory( |
| 34 | + string sourceDirectoryName, |
11 | 35 | string destinationArchiveFileName); |
12 | 36 |
|
13 | 37 | /// <inheritdoc cref="ZipFile.CreateFromDirectory(string, string, CompressionLevel, bool)" /> |
14 | | - void CreateFromDirectory(string sourceDirectoryName, |
| 38 | + void CreateFromDirectory( |
| 39 | + string sourceDirectoryName, |
15 | 40 | string destinationArchiveFileName, |
16 | 41 | CompressionLevel compressionLevel, |
17 | 42 | bool includeBaseDirectory); |
18 | 43 |
|
19 | 44 | /// <inheritdoc cref="ZipFile.CreateFromDirectory(string, string, CompressionLevel, bool, Encoding)" /> |
20 | | - void CreateFromDirectory(string sourceDirectoryName, |
| 45 | + void CreateFromDirectory( |
| 46 | + string sourceDirectoryName, |
21 | 47 | string destinationArchiveFileName, |
22 | 48 | CompressionLevel compressionLevel, |
23 | 49 | bool includeBaseDirectory, |
24 | 50 | Encoding entryNameEncoding); |
25 | 51 |
|
| 52 | +#if FEATURE_COMPRESSION_STREAM |
| 53 | + /// <inheritdoc cref="ZipFile.ExtractToDirectory(Stream, string)" /> |
| 54 | + void ExtractToDirectory( |
| 55 | + Stream source, |
| 56 | + string destinationDirectoryName); |
| 57 | + |
| 58 | + /// <inheritdoc cref="ZipFile.ExtractToDirectory(Stream, string, bool)" /> |
| 59 | + void ExtractToDirectory( |
| 60 | + Stream source, |
| 61 | + string destinationDirectoryName, |
| 62 | + bool overwriteFiles); |
| 63 | + |
| 64 | + /// <inheritdoc cref="ZipFile.ExtractToDirectory(Stream, string, Encoding)" /> |
| 65 | + void ExtractToDirectory( |
| 66 | + Stream source, |
| 67 | + string destinationDirectoryName, |
| 68 | + Encoding entryNameEncoding); |
| 69 | + |
| 70 | + /// <inheritdoc cref="ZipFile.ExtractToDirectory(Stream, string, Encoding, bool)" /> |
| 71 | + void ExtractToDirectory( |
| 72 | + Stream source, |
| 73 | + string destinationDirectoryName, |
| 74 | + Encoding entryNameEncoding, |
| 75 | + bool overwriteFiles); |
| 76 | +#endif |
| 77 | + |
26 | 78 | /// <inheritdoc cref="ZipFile.ExtractToDirectory(string, string)" /> |
27 | | - void ExtractToDirectory(string sourceArchiveFileName, |
| 79 | + void ExtractToDirectory( |
| 80 | + string sourceArchiveFileName, |
28 | 81 | string destinationDirectoryName); |
29 | 82 |
|
30 | 83 | #if FEATURE_COMPRESSION_OVERWRITE |
31 | 84 | /// <inheritdoc cref="ZipFile.ExtractToDirectory(string, string, bool)" /> |
32 | | - void ExtractToDirectory(string sourceArchiveFileName, |
| 85 | + void ExtractToDirectory( |
| 86 | + string sourceArchiveFileName, |
33 | 87 | string destinationDirectoryName, |
34 | 88 | bool overwriteFiles); |
35 | 89 | #endif |
36 | 90 |
|
37 | 91 | /// <inheritdoc cref="ZipFile.ExtractToDirectory(string, string, Encoding?)" /> |
38 | | - void ExtractToDirectory(string sourceArchiveFileName, |
| 92 | + void ExtractToDirectory( |
| 93 | + string sourceArchiveFileName, |
39 | 94 | string destinationDirectoryName, |
40 | 95 | Encoding? entryNameEncoding); |
41 | 96 |
|
42 | 97 | #if FEATURE_COMPRESSION_OVERWRITE |
43 | 98 | /// <inheritdoc cref="ZipFile.ExtractToDirectory(string, string, Encoding?, bool)" /> |
44 | | - void ExtractToDirectory(string sourceArchiveFileName, |
| 99 | + void ExtractToDirectory( |
| 100 | + string sourceArchiveFileName, |
45 | 101 | string destinationDirectoryName, |
46 | 102 | Encoding? entryNameEncoding, |
47 | 103 | bool overwriteFiles); |
48 | 104 | #endif |
49 | 105 |
|
50 | 106 | /// <inheritdoc cref="ZipFile.Open(string, ZipArchiveMode)" /> |
51 | | - IZipArchive Open(string archiveFileName, |
| 107 | + IZipArchive Open( |
| 108 | + string archiveFileName, |
52 | 109 | ZipArchiveMode mode); |
53 | 110 |
|
54 | 111 | /// <inheritdoc cref="IZipFile.Open(string, ZipArchiveMode, Encoding?)" /> |
55 | | - IZipArchive Open(string archiveFileName, |
| 112 | + IZipArchive Open( |
| 113 | + string archiveFileName, |
56 | 114 | ZipArchiveMode mode, |
57 | 115 | Encoding? entryNameEncoding); |
58 | 116 |
|
59 | 117 | /// <inheritdoc cref="ZipFile.OpenRead(string)" /> |
60 | | - IZipArchive OpenRead(string archiveFileName); |
| 118 | + IZipArchive OpenRead( |
| 119 | + string archiveFileName); |
61 | 120 | } |
0 commit comments