OwlCore.Storage implementations for SharpCompress. Allows you to treat an archive file as a normal folder.
Published releases are available on NuGet. To install, run the following command in the Package Manager Console.
PM> Install-Package OwlCore.Storage.SharpCompress
Or using dotnet
> dotnet add package OwlCore.Storage.SharpCompress
// Can be SystemFile, WindowsStorageFile, OneDriveFile, HttpFile, IpfsFile, FtpFile, StreamFile, etc.
IFile file = new SystemFile("C:\\archive.7z");
// Read supported: rar, 7zip, zip, tar, bzip2, gzip, lzip
var archiveFolder = new ReadOnlyArchiveFolder(file);
// Read/Write supported: zip, tar, bzip2, gzip, lzip
var archiveFolder2 = new ArchiveFolder(file);
await foreach (var item in archiveFolder.GetItemsAsync())
{
if (item is IFile file)
{
// ...
}
if (item is IFolder folder)
{
// ...
}
}