mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-14 21:23:38 +00:00
31 lines
961 B
C#
31 lines
961 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using SharpCompress.Common;
|
|
using SharpCompress.Readers;
|
|
|
|
namespace SharpCompress.Archives;
|
|
|
|
class AutoArchiveFactory : IArchiveFactory
|
|
{
|
|
public string Name => nameof(AutoArchiveFactory);
|
|
|
|
public ArchiveType? KnownArchiveType => null;
|
|
|
|
public IEnumerable<string> GetSupportedExtensions() => throw new NotSupportedException();
|
|
|
|
public bool IsArchive(
|
|
Stream stream,
|
|
string? password = null,
|
|
int bufferSize = ReaderOptions.DefaultBufferSize
|
|
) => throw new NotSupportedException();
|
|
|
|
public FileInfo? GetFilePart(int index, FileInfo part1) => throw new NotSupportedException();
|
|
|
|
public IArchive Open(Stream stream, ReaderOptions? readerOptions = null) =>
|
|
ArchiveFactory.Open(stream, readerOptions);
|
|
|
|
public IArchive Open(FileInfo fileInfo, ReaderOptions? readerOptions = null) =>
|
|
ArchiveFactory.Open(fileInfo, readerOptions);
|
|
}
|