SevenZipEntry.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. namespace SharpCompress.Common.SevenZip
  4. {
  5. public class SevenZipEntry : Entry
  6. {
  7. internal SevenZipEntry(SevenZipFilePart filePart)
  8. {
  9. FilePart = filePart;
  10. }
  11. internal SevenZipFilePart FilePart { get; }
  12. public override CompressionType CompressionType => FilePart.CompressionType;
  13. public override long Crc => FilePart.Header.Crc ?? 0;
  14. public override string Key => FilePart.Header.Name;
  15. public override long CompressedSize => 0;
  16. public override long Size => FilePart.Header.Size;
  17. public override DateTime? LastModifiedTime => FilePart.Header.MTime;
  18. public override DateTime? CreatedTime => null;
  19. public override DateTime? LastAccessedTime => null;
  20. public override DateTime? ArchivedTime => null;
  21. public override bool IsEncrypted => false;
  22. public override bool IsDirectory => FilePart.Header.IsDir;
  23. public override bool IsSplitAfter => false;
  24. public override int? Attrib => (int)FilePart.Header.Attrib;
  25. internal override IEnumerable<FilePart> Parts => FilePart.AsEnumerable<FilePart>();
  26. }
  27. }