in C# when using SevenZipSharp, how can I extract a single specific file? (I don't want to extract all the archive).
A:
public void ExtractFile(
string fileName,
Stream stream
)
Does this help ?
nc3b
2010-04-26 07:47:24
mm thanks, I tried to do it with FileStream something like this:SevenZipExtractor extractor = new SevenZipExtractor(zipFileLocation, ZIP_PASSWORD);Stream st = new FileStream(zipFileLocation,FileMode.Open); extractor.ExtractFile(0,st);though there isn't any error, I don't see that the file was extracted anyware...How to define its destination (I don't see any function..)?maybe I don't use the right Stream object?
Eyal
2010-04-26 07:57:11
The second argument is described as "The stream where the file is to be unpacked." Not sure if this is needed, but are you closing the stream ?
nc3b
2010-04-26 08:04:31
you are right.the stream is the target, and I didn't close it.now it works, Thanks!
Eyal
2010-04-26 08:12:43