adamhathcock / sharpcompress

SharpCompress is a fully managed C# library to deal with many compression types and formats.
MIT License
2.27k stars 481 forks source link

entry.WriteToDirectory #204

Closed et721 closed 7 years ago

et721 commented 7 years ago

This method is missing?

aximili commented 7 years ago

I guess the extract RAR example here is wrong https://github.com/adamhathcock/sharpcompress/blob/master/USAGE.md

The Archive example here works: https://sharpcompress.codeplex.com/wikipage?title=Composite%20API%20Examples

var archive = ArchiveFactory.Open(@"C:\Code\sharpcompress\TestArchives\sharpcompress.zip");
foreach (var entry in archive.Entries)
{
    if (!entry.IsDirectory)
    {
        Console.WriteLine(entry.FilePath);
        entry.WriteToDirectory(@"C:\temp", ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite);
    }
}
adamhathcock commented 7 years ago

@Ethan872 It's only missing if you're on a platform that doesn't support File operations like phones.

@aximili no, that code sample is wrong unless you're on an old version.