public static HLibDiscItem GetDiskItem(HLibFileZIP zip, ZipEntry entry) { if (zip == null || entry == null) { throw new ArgumentNullException(); } if (!File.Exists(zip.FullName)) { throw new ExceptionPath(zip.Path, zip.Name); } if (entry.IsDirectory) { return(new HLibDirectory(zip, entry)); } else { using (var st = entry.OpenReader()) { byte[] bt = new byte[6]; st.Read(bt, 0, 6); if (Enumerable.SequenceEqual(bt, fb2Signature)) { return(new HLibFileFB2(zip, entry)); } } } throw new NotSupportedException(); }
public HLibFile(HLibFileZIP zip, ZipEntry entry) : base(zip, entry) { }
public HLibDirectory(HLibFileZIP zip, ZipEntry entry) : base(zip, entry) { }