mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Make sure some FsCreator classes are updated
This commit is contained in:
parent
245dff0e6d
commit
436f71e6a7
3 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,10 @@ using LibHac.Fs.Fsa;
|
|||
|
||||
namespace LibHac.FsSrv.FsCreator;
|
||||
|
||||
/// <summary>
|
||||
/// Creates an <see cref="IFileSystem"/> from an <see cref="IStorage"/> containing a partition filesystem.
|
||||
/// </summary>
|
||||
/// <remarks>Based on nnSdk 18.3.0 (FS 18.0.0)</remarks>
|
||||
public interface IPartitionFileSystemCreator
|
||||
{
|
||||
Result Create(ref SharedRef<IFileSystem> outFileSystem, ref readonly SharedRef<IStorage> baseStorage);
|
||||
|
|
|
@ -5,11 +5,14 @@ using LibHac.FsSystem;
|
|||
|
||||
namespace LibHac.FsSrv.FsCreator;
|
||||
|
||||
/// <inheritdoc cref="IPartitionFileSystemCreator"/>
|
||||
public class PartitionFileSystemCreator : IPartitionFileSystemCreator
|
||||
{
|
||||
public Result Create(ref SharedRef<IFileSystem> outFileSystem, ref readonly SharedRef<IStorage> baseStorage)
|
||||
{
|
||||
using var partitionFs = new SharedRef<PartitionFileSystem>(new PartitionFileSystem());
|
||||
if (!partitionFs.HasValue)
|
||||
return ResultFs.AllocationMemoryFailedInPartitionFileSystemCreatorA.Log();
|
||||
|
||||
Result res = partitionFs.Get.Initialize(in baseStorage);
|
||||
if (res.IsFailure()) return res.Miss();
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace LibHac.FsSrv.FsCreator;
|
|||
/// <summary>
|
||||
/// Creates <see cref="IStorage"/>s for accessing the inserted SD card's storage.
|
||||
/// </summary>
|
||||
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||
/// <remarks>Based on nnSdk 18.3.0 (FS 18.0.0)</remarks>
|
||||
public class SdStorageCreator : ISdStorageCreator
|
||||
{
|
||||
// LibHac addition
|
||||
|
|
Loading…
Reference in a new issue