rardecode icon indicating copy to clipboard operation
rardecode copied to clipboard

List of files

Open raichu opened this issue 9 years ago • 4 comments

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.

raichu avatar Jun 11 '15 23:06 raichu

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.

nwaples avatar Jun 26 '15 01:06 nwaples

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.

belak avatar Jul 04 '17 10:07 belak

I have a List() in the experimental branch. You can try that and see if it works for you.

nwaples avatar Jul 04 '17 10:07 nwaples

Thanks for the quick response! I'll take a look. :)

belak avatar Jul 04 '17 10:07 belak