rardecode
rardecode copied to clipboard
List of files
It would be nice to able able to get a list of all file(names) without having to reopen the archive.
Currently, we can check filenames one by one using Next(), but there is not Reset(). A slice of []File as in archive/zip would be best IMO.
It would be nice. I will have to rewrite some of the internals (some of which I need to do), so its not a quick addition.
In zip the list of files is stored at the end of the archive. For most rar archives (except for rar v5 archives with quick open records I think) you have to scan all the archive files to get this list. So I would be more inclined to have a List() function (on ReadCloser) that returned the list of files.
What's the status on this? I'm writing something which steps forward and backward through files and it looks like the only way to do this is to walk the entire list every time.
I have a List() in the experimental branch. You can try that and see if it works for you.
Thanks for the quick response! I'll take a look. :)