mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-17 21:23:27 +00:00
So that when working with ArchiveFactory, you can cast the opened archive to IWritableArchive for accessing AddEntry, RemoveEntry and SaveTo methods without having to know what type of archive is opened underhood. Also moved extension methods from AbstractWritableArchive to this new interface. Also added GZipArchive to ArchiveFactory.Create as it is one of the 3 writable archive types (zip, tar, gzip), not sure why it was omitted.
15 lines
393 B
C#
15 lines
393 B
C#
using System;
|
|
using System.IO;
|
|
using SharpCompress.Common;
|
|
|
|
namespace SharpCompress.Archive
|
|
{
|
|
public interface IWritableArchive : IArchive
|
|
{
|
|
void RemoveEntry(IArchiveEntry entry);
|
|
|
|
IArchiveEntry AddEntry(string key, Stream source, bool closeStream, long size = 0, DateTime? modified = null);
|
|
|
|
void SaveTo(Stream stream, CompressionInfo compressionType);
|
|
}
|
|
} |