Quantcast
Channel: sharpcompress Discussions Rss Feed
Viewing all articles
Browse latest Browse all 239

New Post: Reading files in order including sub directories

$
0
0
I'm trying to read archives in order that can be in the following format:

-File1
-File2
-File3

or

-SubDirectory
--File1
--File2
--File3

Using the method in the documentation works and includes sub folders but seems to read files in a random order:
var reader = ReaderFactory.Open(stream);
    while (reader.MoveToNextEntry())javascript:void(0);
Using the second method in the documentation doesn't include the sub folders but reads in the correct file order:
var archive = ArchiveFactory.Open(@"C:\Code\sharpcompress\TestArchives\sharpcompress.zip");
foreach (var entry in archive.Entries)
Is there a best of both worlds solution possible here where I can read the exact first file including sub directories? At the moment I'm having to use the first method and use a set of regular expressions to determine if it is in fact the file I am looking for which can be very slow and error prone.

Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>