mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ZipFile, ZipFileEntry, FileTools] Move more things around
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
using Ionic.Crc;
|
using OCRC;
|
||||||
using Ionic.Zlib;
|
|
||||||
using OCRC;
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SabreTools.Helper
|
namespace SabreTools.Helper
|
||||||
{
|
{
|
||||||
@@ -52,6 +48,10 @@ namespace SabreTools.Helper
|
|||||||
{
|
{
|
||||||
get { return _zipStatus; }
|
get { return _zipStatus; }
|
||||||
}
|
}
|
||||||
|
public List<ZipFileEntry> Entries
|
||||||
|
{
|
||||||
|
get { return _entries; }
|
||||||
|
}
|
||||||
public int EntriesCount
|
public int EntriesCount
|
||||||
{
|
{
|
||||||
get { return _entries.Count; }
|
get { return _entries.Count; }
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace SabreTools.Helper
|
|||||||
/// Based on work by GordonJ for RomVault
|
/// Based on work by GordonJ for RomVault
|
||||||
/// https://github.com/gjefferyes/RomVault/blob/master/ROMVault2/SupportedFiles/Zip/zipFile.cs
|
/// https://github.com/gjefferyes/RomVault/blob/master/ROMVault2/SupportedFiles/Zip/zipFile.cs
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class ZipFileEntry
|
public class ZipFileEntry : IEquatable<ZipFileEntry>
|
||||||
{
|
{
|
||||||
#region Private instance variables
|
#region Private instance variables
|
||||||
|
|
||||||
@@ -155,6 +155,16 @@ namespace SabreTools.Helper
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Check if an entry equals another (use only name for now)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="zfe"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool Equals(ZipFileEntry zfe)
|
||||||
|
{
|
||||||
|
return (String.Equals(_fileName, zfe.FileName, StringComparison.InvariantCultureIgnoreCase));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read the central directory entry from the input stream
|
/// Read the central directory entry from the input stream
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using OCRC;
|
//using Ionic.Zlib;
|
||||||
|
using OCRC;
|
||||||
using SharpCompress.Archive;
|
using SharpCompress.Archive;
|
||||||
using SharpCompress.Archive.SevenZip;
|
using SharpCompress.Archive.SevenZip;
|
||||||
using SharpCompress.Common;
|
using SharpCompress.Common;
|
||||||
using SharpCompress.Reader;
|
using SharpCompress.Reader;
|
||||||
using System;
|
using System;
|
||||||
//using Ionic.Zlib;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
|
|||||||
Reference in New Issue
Block a user