mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Symbian Installation File] Implement GetEntryNumber().
This commit is contained in:
@@ -30,6 +30,8 @@
|
|||||||
// Copyright © 2011-2023 Natalia Portillo
|
// Copyright © 2011-2023 Natalia Portillo
|
||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Aaru.Archives;
|
namespace Aaru.Archives;
|
||||||
|
|
||||||
public sealed partial class Symbian
|
public sealed partial class Symbian
|
||||||
@@ -37,12 +39,12 @@ public sealed partial class Symbian
|
|||||||
#region IArchive Members
|
#region IArchive Members
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int GetNumberOfEntries() => _opened ? -1 : _files.Count;
|
public int GetNumberOfEntries() => _opened ? _files.Count : -1;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string GetFilename(int entryNumber)
|
public string GetFilename(int entryNumber)
|
||||||
{
|
{
|
||||||
if(_opened)
|
if(!_opened)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if(entryNumber < 0 || entryNumber >= _files.Count)
|
if(entryNumber < 0 || entryNumber >= _files.Count)
|
||||||
@@ -51,5 +53,19 @@ public sealed partial class Symbian
|
|||||||
return _files[entryNumber].destinationName;
|
return _files[entryNumber].destinationName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public int GetEntryNumber(string fileName, bool caseInsensitiveMatch)
|
||||||
|
{
|
||||||
|
if(!_opened)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if(string.IsNullOrEmpty(fileName))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return _files.FindIndex(x => caseInsensitiveMatch
|
||||||
|
? x.destinationName.Equals(fileName, StringComparison.CurrentCultureIgnoreCase)
|
||||||
|
: x.destinationName.Equals(fileName, StringComparison.CurrentCulture));
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -45,9 +45,6 @@ public sealed partial class Symbian
|
|||||||
{
|
{
|
||||||
#region IArchive Members
|
#region IArchive Members
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public int GetEntryNumber(string fileName, bool caseInsensitiveMatch) => throw new NotImplementedException();
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public long GetCompressedSize(int entryNumber) => throw new NotImplementedException();
|
public long GetCompressedSize(int entryNumber) => throw new NotImplementedException();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user