Possible to extract without directory structure?

May 6, 2009 at 3:50 PM
Edited May 6, 2009 at 4:05 PM
Is is possible with SevenZipSharp to extract a file from an archive and disregard any path information?

I.e., I have the following structure in an archive:

ArchiveFile.zip
+-Subdirectory
  +-File1.txt

I would like to extract the File1.txt to c:\temp, but with the extraction methods I've found (ExtractFile and ExtractArchive), the file will be extracted to c:\temp\Subdirectory\File1.txt.

Is there any way to force SevenZipSharp to ignore path information?  Yes, I realize I can move the file around after the fact, but I think it might be a useful feature if supported by the 7zip library. 

I know this must be theoretically possible, because I can achieve the same functionality with a bit of heavy lifting through using an ExtractFileCallback delegate, and supplying the base extraction path + filename to the ExtractToFile property of the ExtractFileCallbackArgs.