mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Symbian Installation File] Implement Stat().
This commit is contained in:
@@ -31,8 +31,9 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
using FileAttributes = System.IO.FileAttributes;
|
||||
|
||||
namespace Aaru.Archives;
|
||||
|
||||
@@ -124,5 +125,26 @@ public sealed partial class Symbian
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber Stat(int entryNumber, out FileEntryInfo stat)
|
||||
{
|
||||
stat = null;
|
||||
|
||||
if(!Opened)
|
||||
return ErrorNumber.NotOpened;
|
||||
|
||||
if(entryNumber < 0 || entryNumber >= _files.Count)
|
||||
return ErrorNumber.OutOfRange;
|
||||
|
||||
stat = new FileEntryInfo
|
||||
{
|
||||
Length = _compressed ? _files[entryNumber].originalLength : _files[entryNumber].length,
|
||||
Attributes = CommonTypes.Structs.FileAttributes.File,
|
||||
Inode = (ulong)entryNumber
|
||||
};
|
||||
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -34,7 +34,6 @@ using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
|
||||
namespace Aaru.Archives;
|
||||
|
||||
@@ -44,9 +43,6 @@ public sealed partial class Symbian
|
||||
{
|
||||
#region IArchive Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber Stat(int entryNumber, out FileEntryInfo stat) => throw new NotImplementedException();
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber GetEntry(int entryNumber, out IFilter filter) => throw new NotImplementedException();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user