mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 13:34:59 +00:00
RAR archives - Cannot get volume number #529
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lchegde on GitHub (Jun 22, 2022).
Is it possible to read the internal volume number for each file in a multi volume archive?
I cannot find this information for RarArchive presently, is this information available using sharpCompress?
If not, is this something that could be supported?
Example from
rar.exe ls, showing the volume number in question for a couple of volume files in the same archive:@adamhathcock commented on GitHub (Jun 22, 2022):
it's possible but it's not that simple. An entry can be spread across multiple volumes. The data is in the FilePart classes and could be exposed somehow: https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Common/Rar/RarFilePart.cs
@Nanook commented on GitHub (Jul 17, 2022):
https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Common/IEntry.cs
Now has the first and last volume index. This index can be used to get the files filenames using archive.Volumes[index].FileName