RarArchive.Extensions.cs 726 B

1234567891011121314151617181920212223
  1. using System.Linq;
  2. namespace SharpCompress.Archives.Rar
  3. {
  4. public static class RarArchiveExtensions
  5. {
  6. /// <summary>
  7. /// RarArchive is the first volume of a multi-part archive. If MultipartVolume is true and IsFirstVolume is false then the first volume file must be missing.
  8. /// </summary>
  9. public static bool IsFirstVolume(this RarArchive archive)
  10. {
  11. return archive.Volumes.First().IsFirstVolume;
  12. }
  13. /// <summary>
  14. /// RarArchive is part of a multi-part archive.
  15. /// </summary>
  16. public static bool IsMultipartVolume(this RarArchive archive)
  17. {
  18. return archive.Volumes.First().IsMultiVolume;
  19. }
  20. }
  21. }