mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
Incomplete refactoring
This commit is contained in:
2
USAGE.md
2
USAGE.md
@@ -31,6 +31,8 @@ To be explicit though, consider always using the overloads that use `ReaderOptio
|
||||
|
||||
## Samples
|
||||
|
||||
Also, look over the tests for more thorough [examples](https://github.com/adamhathcock/sharpcompress/tree/master/test/SharpCompress.Test)
|
||||
|
||||
### Create Zip Archive from all files in a directory to a file
|
||||
|
||||
```C#
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace SharpCompress.Test
|
||||
using (var archive = RarArchive.Open(stream, new ReaderOptions()
|
||||
{
|
||||
Password = password,
|
||||
LeaveOpenStream = true
|
||||
LeaveStreamOpen = true
|
||||
}))
|
||||
{
|
||||
foreach (var entry in archive.Entries)
|
||||
@@ -68,7 +68,7 @@ namespace SharpCompress.Test
|
||||
using (var archive = RarArchive.Open(Path.Combine(TEST_ARCHIVES_PATH, archiveName), new ReaderOptions()
|
||||
{
|
||||
Password = password,
|
||||
LeaveOpenStream = true
|
||||
LeaveStreamOpen = true
|
||||
}))
|
||||
{
|
||||
foreach (var entry in archive.Entries.Where(entry => !entry.IsDirectory))
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace SharpCompress.Test.Rar
|
||||
ResetScratch();
|
||||
rarHeaderFactory = new RarHeaderFactory(StreamingMode.Seekable, new ReaderOptions()
|
||||
{
|
||||
LeaveOpenStream = true
|
||||
LeaveStreamOpen = true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace SharpCompress.Test
|
||||
{
|
||||
using (var writer = WriterFactory.Open(new NonDisposingStream(stream), type, new WriterOptions(compressionType)
|
||||
{
|
||||
LeaveOpenStream = true
|
||||
LeaveStreamOpen = true
|
||||
}))
|
||||
{
|
||||
writer.WriteAll(ORIGINAL_FILES_PATH, "*", SearchOption.AllDirectories);
|
||||
|
||||
Reference in New Issue
Block a user