mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] One utility class now
This commit is contained in:
@@ -426,7 +426,7 @@ namespace ROMVault2.SupportedFiles.Zip
|
||||
}
|
||||
|
||||
// Now try to open the file for reading
|
||||
_zipstream = FileTools.TryOpenRead(filename);
|
||||
_zipstream = Utilities.TryOpenRead(filename);
|
||||
int read = _zipstream.Read(new byte[1], 0, 1);
|
||||
if (read != 1)
|
||||
{
|
||||
@@ -757,7 +757,7 @@ namespace ROMVault2.SupportedFiles.Zip
|
||||
_zipstream.Dispose();
|
||||
|
||||
// Delete the failed file
|
||||
FileTools.TryDeleteFile(_zipFileInfo.FullName);
|
||||
Utilities.TryDeleteFile(_zipFileInfo.FullName);
|
||||
_zipFileInfo = null;
|
||||
_zipOpen = ZipOpenType.Closed;
|
||||
}
|
||||
|
||||
@@ -78,12 +78,12 @@ namespace ROMVault2.SupportedFiles.Zip
|
||||
public string ExtraField
|
||||
{
|
||||
get { return Encoding.GetEncoding(858).GetString(_extraField); }
|
||||
set { _extraField = Style.StringToByteArray(Style.ConvertAsciiToHex(value)); }
|
||||
set { _extraField = Utilities.StringToByteArray(Utilities.ConvertAsciiToHex(value)); }
|
||||
}
|
||||
public string Comment
|
||||
{
|
||||
get { return Encoding.GetEncoding(858).GetString(_comment); }
|
||||
set { _comment = Style.StringToByteArray(Style.ConvertAsciiToHex(value)); }
|
||||
set { _comment = Utilities.StringToByteArray(Utilities.ConvertAsciiToHex(value)); }
|
||||
}
|
||||
public ulong RelativeOffset
|
||||
{
|
||||
@@ -333,7 +333,7 @@ namespace ROMVault2.SupportedFiles.Zip
|
||||
|
||||
// Now check for a unicode filename and set the flag accordingly
|
||||
byte[] fileNameBytes;
|
||||
if (Style.IsUnicode(_fileName))
|
||||
if (Utilities.IsUnicode(_fileName))
|
||||
{
|
||||
_generalPurposeBitFlag |= GeneralPurposeBitFlag.LanguageEncodingFlag;
|
||||
fileNameBytes = Encoding.UTF8.GetBytes(_fileName);
|
||||
@@ -708,7 +708,7 @@ namespace ROMVault2.SupportedFiles.Zip
|
||||
|
||||
// Now check for a unicode filename and set the flag accordingly
|
||||
byte[] fileNameBytes;
|
||||
if (Style.IsUnicode(_fileName))
|
||||
if (Utilities.IsUnicode(_fileName))
|
||||
{
|
||||
_generalPurposeBitFlag |= GeneralPurposeBitFlag.LanguageEncodingFlag;
|
||||
fileNameBytes = Encoding.UTF8.GetBytes(_fileName);
|
||||
|
||||
Reference in New Issue
Block a user