From c6a09d1dfa035e5c437c91a517f8b964a6c874ca Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Sun, 19 Dec 2021 00:16:47 -0700 Subject: [PATCH] Move StorageStream, NullFile, NullStorage --- src/LibHac/FsSystem/ConcatenationStorageBuilder.cs | 3 ++- src/LibHac/FsSystem/StorageExtensions.cs | 3 ++- src/LibHac/{ => Tools}/FsSystem/NullFile.cs | 4 ++-- src/LibHac/{ => Tools}/FsSystem/NullStorage.cs | 4 ++-- src/LibHac/{ => Tools}/FsSystem/StorageStream.cs | 4 ++-- src/LibHac/Tools/Ro/Nro.cs | 1 + 6 files changed, 11 insertions(+), 8 deletions(-) rename src/LibHac/{ => Tools}/FsSystem/NullFile.cs (97%) rename src/LibHac/{ => Tools}/FsSystem/NullStorage.cs (96%) rename src/LibHac/{ => Tools}/FsSystem/StorageStream.cs (98%) diff --git a/src/LibHac/FsSystem/ConcatenationStorageBuilder.cs b/src/LibHac/FsSystem/ConcatenationStorageBuilder.cs index fa606aa2..05fbc7ef 100644 --- a/src/LibHac/FsSystem/ConcatenationStorageBuilder.cs +++ b/src/LibHac/FsSystem/ConcatenationStorageBuilder.cs @@ -2,6 +2,7 @@ using System.IO; using System.Linq; using LibHac.Fs; +using LibHac.Tools.FsSystem; namespace LibHac.FsSystem; @@ -62,4 +63,4 @@ public class ConcatenationStorageSegment Storage = storage; Offset = offset; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/StorageExtensions.cs b/src/LibHac/FsSystem/StorageExtensions.cs index 71f763d1..34648f7b 100644 --- a/src/LibHac/FsSystem/StorageExtensions.cs +++ b/src/LibHac/FsSystem/StorageExtensions.cs @@ -5,6 +5,7 @@ using System.Runtime.InteropServices; using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; +using LibHac.Tools.FsSystem; namespace LibHac.FsSystem; @@ -220,4 +221,4 @@ public static class StorageExtensions if (stream == null) return null; return new StreamStorage(stream, keepOpen).Slice(start, length); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/NullFile.cs b/src/LibHac/Tools/FsSystem/NullFile.cs similarity index 97% rename from src/LibHac/FsSystem/NullFile.cs rename to src/LibHac/Tools/FsSystem/NullFile.cs index 6d394df4..d6605617 100644 --- a/src/LibHac/FsSystem/NullFile.cs +++ b/src/LibHac/Tools/FsSystem/NullFile.cs @@ -2,7 +2,7 @@ using LibHac.Fs; using LibHac.Fs.Fsa; -namespace LibHac.FsSystem; +namespace LibHac.Tools.FsSystem; public class NullFile : IFile { @@ -57,4 +57,4 @@ public class NullFile : IFile { return ResultFs.UnsupportedOperation.Log(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/NullStorage.cs b/src/LibHac/Tools/FsSystem/NullStorage.cs similarity index 96% rename from src/LibHac/FsSystem/NullStorage.cs rename to src/LibHac/Tools/FsSystem/NullStorage.cs index 4f36b14a..452b7153 100644 --- a/src/LibHac/FsSystem/NullStorage.cs +++ b/src/LibHac/Tools/FsSystem/NullStorage.cs @@ -1,7 +1,7 @@ using System; using LibHac.Fs; -namespace LibHac.FsSystem; +namespace LibHac.Tools.FsSystem; /// /// An that returns all zeros when read, and does nothing on write. @@ -40,4 +40,4 @@ public class NullStorage : IStorage size = Length; return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/StorageStream.cs b/src/LibHac/Tools/FsSystem/StorageStream.cs similarity index 98% rename from src/LibHac/FsSystem/StorageStream.cs rename to src/LibHac/Tools/FsSystem/StorageStream.cs index 19bd6174..589814b5 100644 --- a/src/LibHac/FsSystem/StorageStream.cs +++ b/src/LibHac/Tools/FsSystem/StorageStream.cs @@ -2,7 +2,7 @@ using System.IO; using LibHac.Fs; -namespace LibHac.FsSystem; +namespace LibHac.Tools.FsSystem; public class StorageStream : Stream { @@ -77,4 +77,4 @@ public class StorageStream : Stream if (!LeaveOpen) BaseStorage?.Dispose(); base.Dispose(disposing); } -} +} \ No newline at end of file diff --git a/src/LibHac/Tools/Ro/Nro.cs b/src/LibHac/Tools/Ro/Nro.cs index c81f788e..c49cd46f 100644 --- a/src/LibHac/Tools/Ro/Nro.cs +++ b/src/LibHac/Tools/Ro/Nro.cs @@ -2,6 +2,7 @@ using LibHac.Common; using LibHac.Fs; using LibHac.FsSystem; +using LibHac.Tools.FsSystem; namespace LibHac.Tools.Ro;