diff --git a/Interfaces/IArchive.cs b/Interfaces/IArchive.cs index 37bc8a6..affc462 100644 --- a/Interfaces/IArchive.cs +++ b/Interfaces/IArchive.cs @@ -82,31 +82,13 @@ public interface IArchive /// Plugin author string Author { get; } - /// Identifies if the specified path contains data recognizable by this archive instance - /// Path. - bool Identify(string path) => File.Exists(path) && Identify(new FileStream(path, FileMode.Open, FileAccess.Read)); - - /// Identifies if the specified stream contains data recognizable by this archive instance - /// Stream. - bool Identify(Stream stream); - - /// Identifies if the specified buffer contains data recognizable by this archive instance - /// Buffer. - bool Identify(byte[] buffer) => Identify(new MemoryStream(buffer)); - - /// Opens the specified path with this archive instance - /// Path. - ErrorNumber Open(string path) => !File.Exists(path) - ? ErrorNumber.NoSuchFile - : Open(new FileStream(path, FileMode.Open, FileAccess.Read)); + /// Identifies if the specified filter contains data recognizable by this archive instance + /// Filter that contains the archive. This allows use to handle .tar.gz and similars. + bool Identify(IFilter filter); /// Opens the specified stream with this archive instance - /// Stream. - ErrorNumber Open(Stream stream); - - /// Opens the specified buffer with this archive instance - /// Buffer. - ErrorNumber Open(byte[] buffer) => Open(new MemoryStream(buffer)); + /// Filter that contains the archive. This allows use to handle .tar.gz and similars. + ErrorNumber Open(IFilter filter); /// /// Returns true if the archive has a file/stream/buffer currently opened and no