From 27bf4a1003e8d5c7cddc143a3ba1d1291561e2f3 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Sun, 19 Dec 2021 00:41:06 -0700 Subject: [PATCH] Move DirectoryEntryEx --- src/LibHac/Fs/DirectoryEntry.cs | 18 ---------------- .../FsSystem/PartitionFileSystemBuilder.cs | 1 + src/LibHac/Tools/Fs/DirectoryEntryEx.cs | 21 +++++++++++++++++++ src/LibHac/Tools/FsSystem/AesXtsFileSystem.cs | 1 + .../Tools/FsSystem/FileSystemExtensions.cs | 1 + .../Tools/FsSystem/RomFs/RomFsBuilder.cs | 1 + .../FsSystem/Save/SaveDataFileSystemCore.cs | 1 + src/hactoolnet/ProcessNca.cs | 1 + src/hactoolnet/ProcessRomfs.cs | 1 + src/hactoolnet/ProcessSave.cs | 1 + 10 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 src/LibHac/Tools/Fs/DirectoryEntryEx.cs diff --git a/src/LibHac/Fs/DirectoryEntry.cs b/src/LibHac/Fs/DirectoryEntry.cs index 7b36417a..2a0569ed 100644 --- a/src/LibHac/Fs/DirectoryEntry.cs +++ b/src/LibHac/Fs/DirectoryEntry.cs @@ -1,27 +1,9 @@ using System; using System.Runtime.InteropServices; using LibHac.Common; -using LibHac.FsSystem; namespace LibHac.Fs; -public class DirectoryEntryEx -{ - public string Name { get; set; } - public string FullPath { get; set; } - public NxFileAttributes Attributes { get; set; } - public DirectoryEntryType Type { get; set; } - public long Size { get; set; } - - public DirectoryEntryEx(string name, string fullPath, DirectoryEntryType type, long size) - { - Name = name; - FullPath = PathTools.Normalize(fullPath); - Type = type; - Size = size; - } -} - [StructLayout(LayoutKind.Explicit)] public struct DirectoryEntry { diff --git a/src/LibHac/FsSystem/PartitionFileSystemBuilder.cs b/src/LibHac/FsSystem/PartitionFileSystemBuilder.cs index ed088124..c5e685b0 100644 --- a/src/LibHac/FsSystem/PartitionFileSystemBuilder.cs +++ b/src/LibHac/FsSystem/PartitionFileSystemBuilder.cs @@ -7,6 +7,7 @@ using LibHac.Common; using LibHac.Crypto; using LibHac.Fs; using LibHac.Fs.Fsa; +using LibHac.Tools.Fs; using LibHac.Tools.FsSystem; using LibHac.Util; diff --git a/src/LibHac/Tools/Fs/DirectoryEntryEx.cs b/src/LibHac/Tools/Fs/DirectoryEntryEx.cs new file mode 100644 index 00000000..0eabb724 --- /dev/null +++ b/src/LibHac/Tools/Fs/DirectoryEntryEx.cs @@ -0,0 +1,21 @@ +using LibHac.Fs; +using LibHac.FsSystem; + +namespace LibHac.Tools.Fs; + +public class DirectoryEntryEx +{ + public string Name { get; set; } + public string FullPath { get; set; } + public NxFileAttributes Attributes { get; set; } + public DirectoryEntryType Type { get; set; } + public long Size { get; set; } + + public DirectoryEntryEx(string name, string fullPath, DirectoryEntryType type, long size) + { + Name = name; + FullPath = PathTools.Normalize(fullPath); + Type = type; + Size = size; + } +} \ No newline at end of file diff --git a/src/LibHac/Tools/FsSystem/AesXtsFileSystem.cs b/src/LibHac/Tools/FsSystem/AesXtsFileSystem.cs index 2c7e60bc..62bda6a1 100644 --- a/src/LibHac/Tools/FsSystem/AesXtsFileSystem.cs +++ b/src/LibHac/Tools/FsSystem/AesXtsFileSystem.cs @@ -4,6 +4,7 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; +using LibHac.Tools.Fs; using LibHac.Util; namespace LibHac.Tools.FsSystem; diff --git a/src/LibHac/Tools/FsSystem/FileSystemExtensions.cs b/src/LibHac/Tools/FsSystem/FileSystemExtensions.cs index 4557de46..4df57c9d 100644 --- a/src/LibHac/Tools/FsSystem/FileSystemExtensions.cs +++ b/src/LibHac/Tools/FsSystem/FileSystemExtensions.cs @@ -7,6 +7,7 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; +using LibHac.Tools.Fs; using LibHac.Util; using Path = LibHac.Fs.Path; diff --git a/src/LibHac/Tools/FsSystem/RomFs/RomFsBuilder.cs b/src/LibHac/Tools/FsSystem/RomFs/RomFsBuilder.cs index b90ff93c..a2e0c7a5 100644 --- a/src/LibHac/Tools/FsSystem/RomFs/RomFsBuilder.cs +++ b/src/LibHac/Tools/FsSystem/RomFs/RomFsBuilder.cs @@ -6,6 +6,7 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; +using LibHac.Tools.Fs; using LibHac.Util; namespace LibHac.Tools.FsSystem.RomFs; diff --git a/src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs b/src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs index 06515b5d..a34b5871 100644 --- a/src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs +++ b/src/LibHac/Tools/FsSystem/Save/SaveDataFileSystemCore.cs @@ -2,6 +2,7 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; +using LibHac.Tools.Fs; using LibHac.Util; using Path = LibHac.Fs.Path; diff --git a/src/hactoolnet/ProcessNca.cs b/src/hactoolnet/ProcessNca.cs index 398849d1..4e609a4d 100644 --- a/src/hactoolnet/ProcessNca.cs +++ b/src/hactoolnet/ProcessNca.cs @@ -7,6 +7,7 @@ using LibHac.Fs.Fsa; using LibHac.Fs.Impl; using LibHac.FsSystem; using LibHac.Npdm; +using LibHac.Tools.Fs; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.NcaUtils; using static hactoolnet.Print; diff --git a/src/hactoolnet/ProcessRomfs.cs b/src/hactoolnet/ProcessRomfs.cs index 5603ae35..be897c00 100644 --- a/src/hactoolnet/ProcessRomfs.cs +++ b/src/hactoolnet/ProcessRomfs.cs @@ -1,6 +1,7 @@ using System.IO; using LibHac.Fs; using LibHac.FsSystem; +using LibHac.Tools.Fs; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.RomFs; diff --git a/src/hactoolnet/ProcessSave.cs b/src/hactoolnet/ProcessSave.cs index e61e0b10..fb16f87f 100644 --- a/src/hactoolnet/ProcessSave.cs +++ b/src/hactoolnet/ProcessSave.cs @@ -9,6 +9,7 @@ using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.Fs.Impl; using LibHac.FsSystem; +using LibHac.Tools.Fs; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.Save; using static hactoolnet.Print;