From 865f271fe753af263ce50955bf7a9366e1424c63 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Sun, 19 Dec 2021 00:22:19 -0700 Subject: [PATCH] Move StreamFile, StreamStorage, StorageExtensions, FileReader --- src/LibHac/FsSystem/LocalFile.cs | 3 ++- src/LibHac/FsSystem/LocalStorage.cs | 3 ++- src/LibHac/FsSystem/PartitionFileSystem.cs | 3 ++- src/LibHac/Tools/FsSystem/AesXtsFileHeader.cs | 1 - src/LibHac/{ => Tools}/FsSystem/FileReader.cs | 2 +- src/LibHac/Tools/FsSystem/RomFs/RomFsDictionary.cs | 1 - src/LibHac/Tools/FsSystem/RomFs/RomFsFileSystem.cs | 1 - src/LibHac/Tools/FsSystem/Save/AllocationTable.cs | 1 - src/LibHac/Tools/FsSystem/Save/DuplexBitmap.cs | 1 - src/LibHac/Tools/FsSystem/Save/DuplexStorage.cs | 1 - src/LibHac/Tools/FsSystem/Save/JournalMap.cs | 1 - src/LibHac/Tools/FsSystem/Save/JournalStorage.cs | 1 - src/LibHac/Tools/FsSystem/Save/RemapStorage.cs | 1 - src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs | 1 - src/LibHac/{ => Tools}/FsSystem/StorageExtensions.cs | 4 ++-- src/LibHac/{ => Tools}/FsSystem/StreamFile.cs | 4 ++-- src/LibHac/{ => Tools}/FsSystem/StreamStorage.cs | 4 ++-- src/LibHac/Tools/Ro/Nro.cs | 1 - src/hactoolnet/ProcessBench.cs | 1 - src/hactoolnet/ProcessFsBuild.cs | 1 + src/hactoolnet/ProcessKip.cs | 3 ++- 21 files changed, 16 insertions(+), 23 deletions(-) rename src/LibHac/{ => Tools}/FsSystem/FileReader.cs (99%) rename src/LibHac/{ => Tools}/FsSystem/StorageExtensions.cs (99%) rename src/LibHac/{ => Tools}/FsSystem/StreamFile.cs (98%) rename src/LibHac/{ => Tools}/FsSystem/StreamStorage.cs (97%) diff --git a/src/LibHac/FsSystem/LocalFile.cs b/src/LibHac/FsSystem/LocalFile.cs index 86c7793e..2b774e3b 100644 --- a/src/LibHac/FsSystem/LocalFile.cs +++ b/src/LibHac/FsSystem/LocalFile.cs @@ -3,6 +3,7 @@ using System.IO; using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; +using LibHac.Tools.FsSystem; namespace LibHac.FsSystem; @@ -99,4 +100,4 @@ public class LocalFile : IFile base.Dispose(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/LocalStorage.cs b/src/LibHac/FsSystem/LocalStorage.cs index 37dff2a9..75ab1ce1 100644 --- a/src/LibHac/FsSystem/LocalStorage.cs +++ b/src/LibHac/FsSystem/LocalStorage.cs @@ -1,6 +1,7 @@ using System; using System.IO; using LibHac.Fs; +using LibHac.Tools.FsSystem; namespace LibHac.FsSystem; @@ -49,4 +50,4 @@ public class LocalStorage : IStorage Storage?.Dispose(); Stream?.Dispose(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/PartitionFileSystem.cs b/src/LibHac/FsSystem/PartitionFileSystem.cs index 0333dad7..8bc647fc 100644 --- a/src/LibHac/FsSystem/PartitionFileSystem.cs +++ b/src/LibHac/FsSystem/PartitionFileSystem.cs @@ -7,6 +7,7 @@ using LibHac.Common; using LibHac.Crypto; using LibHac.Fs; using LibHac.Fs.Fsa; +using LibHac.Tools.FsSystem; using Path = LibHac.Fs.Path; namespace LibHac.FsSystem; @@ -188,4 +189,4 @@ public class PartitionFileEntry throw new ArgumentOutOfRangeException(nameof(type), type, null); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Tools/FsSystem/AesXtsFileHeader.cs b/src/LibHac/Tools/FsSystem/AesXtsFileHeader.cs index 839b8b62..7eaa2ed2 100644 --- a/src/LibHac/Tools/FsSystem/AesXtsFileHeader.cs +++ b/src/LibHac/Tools/FsSystem/AesXtsFileHeader.cs @@ -5,7 +5,6 @@ using System.Text; using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; -using LibHac.FsSystem; using Aes = LibHac.Crypto.Aes; namespace LibHac.Tools.FsSystem; diff --git a/src/LibHac/FsSystem/FileReader.cs b/src/LibHac/Tools/FsSystem/FileReader.cs similarity index 99% rename from src/LibHac/FsSystem/FileReader.cs rename to src/LibHac/Tools/FsSystem/FileReader.cs index 23f26267..cebfc493 100644 --- a/src/LibHac/FsSystem/FileReader.cs +++ b/src/LibHac/Tools/FsSystem/FileReader.cs @@ -4,7 +4,7 @@ using System.Runtime.InteropServices; using System.Text; using LibHac.Fs.Fsa; -namespace LibHac.FsSystem; +namespace LibHac.Tools.FsSystem; public class FileReader { diff --git a/src/LibHac/Tools/FsSystem/RomFs/RomFsDictionary.cs b/src/LibHac/Tools/FsSystem/RomFs/RomFsDictionary.cs index e720cca5..1fd0ec75 100644 --- a/src/LibHac/Tools/FsSystem/RomFs/RomFsDictionary.cs +++ b/src/LibHac/Tools/FsSystem/RomFs/RomFsDictionary.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using LibHac.Fs; -using LibHac.FsSystem; using LibHac.Util; namespace LibHac.Tools.FsSystem.RomFs; diff --git a/src/LibHac/Tools/FsSystem/RomFs/RomFsFileSystem.cs b/src/LibHac/Tools/FsSystem/RomFs/RomFsFileSystem.cs index 44b4d85b..99201d23 100644 --- a/src/LibHac/Tools/FsSystem/RomFs/RomFsFileSystem.cs +++ b/src/LibHac/Tools/FsSystem/RomFs/RomFsFileSystem.cs @@ -2,7 +2,6 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; -using LibHac.FsSystem; namespace LibHac.Tools.FsSystem.RomFs; diff --git a/src/LibHac/Tools/FsSystem/Save/AllocationTable.cs b/src/LibHac/Tools/FsSystem/Save/AllocationTable.cs index 4f9b21d8..24c22672 100644 --- a/src/LibHac/Tools/FsSystem/Save/AllocationTable.cs +++ b/src/LibHac/Tools/FsSystem/Save/AllocationTable.cs @@ -4,7 +4,6 @@ using System.IO; using System.Runtime.InteropServices; using LibHac.Common; using LibHac.Fs; -using LibHac.FsSystem; namespace LibHac.Tools.FsSystem.Save; diff --git a/src/LibHac/Tools/FsSystem/Save/DuplexBitmap.cs b/src/LibHac/Tools/FsSystem/Save/DuplexBitmap.cs index 2a08a0f5..cb5a3b12 100644 --- a/src/LibHac/Tools/FsSystem/Save/DuplexBitmap.cs +++ b/src/LibHac/Tools/FsSystem/Save/DuplexBitmap.cs @@ -2,7 +2,6 @@ using System.Collections; using System.IO; using LibHac.Fs; -using LibHac.FsSystem; namespace LibHac.Tools.FsSystem.Save; diff --git a/src/LibHac/Tools/FsSystem/Save/DuplexStorage.cs b/src/LibHac/Tools/FsSystem/Save/DuplexStorage.cs index 1ca7a7b7..d9e2c042 100644 --- a/src/LibHac/Tools/FsSystem/Save/DuplexStorage.cs +++ b/src/LibHac/Tools/FsSystem/Save/DuplexStorage.cs @@ -1,6 +1,5 @@ using System; using LibHac.Fs; -using LibHac.FsSystem; namespace LibHac.Tools.FsSystem.Save; diff --git a/src/LibHac/Tools/FsSystem/Save/JournalMap.cs b/src/LibHac/Tools/FsSystem/Save/JournalMap.cs index d77d19f1..117233f4 100644 --- a/src/LibHac/Tools/FsSystem/Save/JournalMap.cs +++ b/src/LibHac/Tools/FsSystem/Save/JournalMap.cs @@ -1,6 +1,5 @@ using System.IO; using LibHac.Fs; -using LibHac.FsSystem; using LibHac.Util; namespace LibHac.Tools.FsSystem.Save; diff --git a/src/LibHac/Tools/FsSystem/Save/JournalStorage.cs b/src/LibHac/Tools/FsSystem/Save/JournalStorage.cs index f11d039d..1ffa15ff 100644 --- a/src/LibHac/Tools/FsSystem/Save/JournalStorage.cs +++ b/src/LibHac/Tools/FsSystem/Save/JournalStorage.cs @@ -3,7 +3,6 @@ using System.Collections; using System.IO; using LibHac.Common; using LibHac.Fs; -using LibHac.FsSystem; namespace LibHac.Tools.FsSystem.Save; diff --git a/src/LibHac/Tools/FsSystem/Save/RemapStorage.cs b/src/LibHac/Tools/FsSystem/Save/RemapStorage.cs index 0b6b10d8..a7a35107 100644 --- a/src/LibHac/Tools/FsSystem/Save/RemapStorage.cs +++ b/src/LibHac/Tools/FsSystem/Save/RemapStorage.cs @@ -4,7 +4,6 @@ using System.IO; using System.Linq; using LibHac.Common; using LibHac.Fs; -using LibHac.FsSystem; namespace LibHac.Tools.FsSystem.Save; diff --git a/src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs b/src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs index b24b0f17..06515b5d 100644 --- a/src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs +++ b/src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs @@ -2,7 +2,6 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; -using LibHac.FsSystem; using LibHac.Util; using Path = LibHac.Fs.Path; diff --git a/src/LibHac/FsSystem/StorageExtensions.cs b/src/LibHac/Tools/FsSystem/StorageExtensions.cs similarity index 99% rename from src/LibHac/FsSystem/StorageExtensions.cs rename to src/LibHac/Tools/FsSystem/StorageExtensions.cs index 34648f7b..84a708fa 100644 --- a/src/LibHac/FsSystem/StorageExtensions.cs +++ b/src/LibHac/Tools/FsSystem/StorageExtensions.cs @@ -5,9 +5,9 @@ using System.Runtime.InteropServices; using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; -using LibHac.Tools.FsSystem; +using LibHac.FsSystem; -namespace LibHac.FsSystem; +namespace LibHac.Tools.FsSystem; public static class StorageExtensions { diff --git a/src/LibHac/FsSystem/StreamFile.cs b/src/LibHac/Tools/FsSystem/StreamFile.cs similarity index 98% rename from src/LibHac/FsSystem/StreamFile.cs rename to src/LibHac/Tools/FsSystem/StreamFile.cs index 9c670e04..60ec7bba 100644 --- a/src/LibHac/FsSystem/StreamFile.cs +++ b/src/LibHac/Tools/FsSystem/StreamFile.cs @@ -4,7 +4,7 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; -namespace LibHac.FsSystem; +namespace LibHac.Tools.FsSystem; /// /// Provides an interface for interacting with a @@ -94,4 +94,4 @@ public class StreamFile : IFile { return ResultFs.NotImplemented.Log(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/StreamStorage.cs b/src/LibHac/Tools/FsSystem/StreamStorage.cs similarity index 97% rename from src/LibHac/FsSystem/StreamStorage.cs rename to src/LibHac/Tools/FsSystem/StreamStorage.cs index de859971..281eea5f 100644 --- a/src/LibHac/FsSystem/StreamStorage.cs +++ b/src/LibHac/Tools/FsSystem/StreamStorage.cs @@ -2,7 +2,7 @@ using System.IO; using LibHac.Fs; -namespace LibHac.FsSystem; +namespace LibHac.Tools.FsSystem; public class StreamStorage : IStorage { @@ -78,4 +78,4 @@ public class StreamStorage : IStorage BaseStream?.Dispose(); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Tools/Ro/Nro.cs b/src/LibHac/Tools/Ro/Nro.cs index c49cd46f..4370b030 100644 --- a/src/LibHac/Tools/Ro/Nro.cs +++ b/src/LibHac/Tools/Ro/Nro.cs @@ -1,7 +1,6 @@ using System.IO; using LibHac.Common; using LibHac.Fs; -using LibHac.FsSystem; using LibHac.Tools.FsSystem; namespace LibHac.Tools.Ro; diff --git a/src/hactoolnet/ProcessBench.cs b/src/hactoolnet/ProcessBench.cs index 8681dee1..8b7d9788 100644 --- a/src/hactoolnet/ProcessBench.cs +++ b/src/hactoolnet/ProcessBench.cs @@ -8,7 +8,6 @@ using LibHac.Common; using LibHac.Crypto; using LibHac.Crypto.Impl; using LibHac.Fs; -using LibHac.FsSystem; using LibHac.Tools.FsSystem; namespace hactoolnet; diff --git a/src/hactoolnet/ProcessFsBuild.cs b/src/hactoolnet/ProcessFsBuild.cs index 98ad3bae..ef9f73f8 100644 --- a/src/hactoolnet/ProcessFsBuild.cs +++ b/src/hactoolnet/ProcessFsBuild.cs @@ -1,6 +1,7 @@ using System.IO; using LibHac.Fs; using LibHac.FsSystem; +using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.RomFs; namespace hactoolnet; diff --git a/src/hactoolnet/ProcessKip.cs b/src/hactoolnet/ProcessKip.cs index 30d9d905..dca41574 100644 --- a/src/hactoolnet/ProcessKip.cs +++ b/src/hactoolnet/ProcessKip.cs @@ -3,6 +3,7 @@ using LibHac.Common; using LibHac.Fs; using LibHac.FsSystem; using LibHac.Kernel; +using LibHac.Tools.FsSystem; namespace hactoolnet; @@ -56,4 +57,4 @@ internal static class ProcessKip sharedKipStorage.Get.WriteAllBytes(System.IO.Path.Combine(outDir, $"{kipReader.Name.ToString()}.kip1")); } } -} +} \ No newline at end of file