I am creating a FileFinder class, where you can do a search like this:
var fileFinder = new FileFinder(
new string[]
{
"C:\\MyFolder1",
"C:\\MyFolder2"
},
new string[]
{
"*.txt",
"*.doc"
} );
fileFinder.FileFound += new EventHandler<FileFinderEventArgs>(FileFinder_FileFound);
DoSearch();
If I executed that code, FileFinder_FileFound would be called every time a *.txt or *.doc file was found in C:\\MyFolder1 and its subfolders, or C:\\MyFolder2 and its subfolders.
Sot the class looks through subfolders, but I also want it to look through any zip files it comes across, as if they were folders. How can I do this? It would be preferable that no temporary files be created…
EDIT Forgot to mention this is not a personal project; its for a commercial application I’m working on with my company.
Checkout System.IO.Packaging Namespace available in .NET 3.5 and higher. You’ll find some good answers here