mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ZipFile, ZipFileEntry] Add regions for sanity
This commit is contained in:
@@ -155,15 +155,7 @@ namespace SabreTools.Helper
|
||||
|
||||
#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));
|
||||
}
|
||||
#region Central Directory
|
||||
|
||||
/// <summary>
|
||||
/// Read the central directory entry from the input stream
|
||||
@@ -387,6 +379,10 @@ namespace SabreTools.Helper
|
||||
// We have no file comment, so we don't have to write more
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Header
|
||||
|
||||
/// <summary>
|
||||
/// Read the local file header from the input stream
|
||||
/// </summary>
|
||||
@@ -778,6 +774,10 @@ namespace SabreTools.Helper
|
||||
bw.Write(extraField.ToArray(), 0, extraFieldLength);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Read and Write
|
||||
|
||||
/// <summary>
|
||||
/// Open the read file stream
|
||||
/// </summary>
|
||||
@@ -946,6 +946,10 @@ namespace SabreTools.Helper
|
||||
_zipstream.Seek(posNow, SeekOrigin.Begin);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
||||
/// <summary>
|
||||
/// Get the data from the current file, if not already checked
|
||||
/// </summary>
|
||||
@@ -1027,5 +1031,17 @@ namespace SabreTools.Helper
|
||||
ds.WriteByte(03);
|
||||
ds.WriteByte(00);
|
||||
}
|
||||
|
||||
/// <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));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user