Add ISaveDataIndexer.GetCount

This commit is contained in:
Alex Barney 2019-10-23 17:30:08 -05:00
parent bf8b975fa6
commit 436de21c86
2 changed files with 9 additions and 0 deletions

View file

@ -15,6 +15,7 @@ namespace LibHac.FsService
Result SetState(ulong saveDataId, SaveDataState state); Result SetState(ulong saveDataId, SaveDataState state);
Result GetKey(out SaveDataAttribute key, ulong saveDataId); Result GetKey(out SaveDataAttribute key, ulong saveDataId);
Result GetBySaveDataId(out SaveDataIndexerValue value, ulong saveDataId); Result GetBySaveDataId(out SaveDataIndexerValue value, ulong saveDataId);
int GetCount();
Result OpenSaveDataInfoReader(out ISaveDataInfoReader infoReader); Result OpenSaveDataInfoReader(out ISaveDataInfoReader infoReader);
} }
} }

View file

@ -344,6 +344,14 @@ namespace LibHac.FsService
} }
} }
public int GetCount()
{
lock (Locker)
{
return KvDatabase.Count;
}
}
public Result OpenSaveDataInfoReader(out ISaveDataInfoReader infoReader) public Result OpenSaveDataInfoReader(out ISaveDataInfoReader infoReader)
{ {
infoReader = default; infoReader = default;