diff --git a/src/LibHac/FsClient/Accessors/DirectoryHandle.cs b/src/LibHac/FsClient/DirectoryHandle.cs similarity index 87% rename from src/LibHac/FsClient/Accessors/DirectoryHandle.cs rename to src/LibHac/FsClient/DirectoryHandle.cs index 05f8fb67..9eb8cf2f 100644 --- a/src/LibHac/FsClient/Accessors/DirectoryHandle.cs +++ b/src/LibHac/FsClient/DirectoryHandle.cs @@ -1,6 +1,7 @@ using System; +using LibHac.FsClient.Accessors; -namespace LibHac.FsClient.Accessors +namespace LibHac.FsClient { public struct DirectoryHandle : IDisposable { diff --git a/src/LibHac/FsClient/Accessors/FileHandle.cs b/src/LibHac/FsClient/FileHandle.cs similarity index 86% rename from src/LibHac/FsClient/Accessors/FileHandle.cs rename to src/LibHac/FsClient/FileHandle.cs index df7c8fa4..387efe01 100644 --- a/src/LibHac/FsClient/Accessors/FileHandle.cs +++ b/src/LibHac/FsClient/FileHandle.cs @@ -1,6 +1,7 @@ using System; +using LibHac.FsClient.Accessors; -namespace LibHac.FsClient.Accessors +namespace LibHac.FsClient { public struct FileHandle : IDisposable { diff --git a/src/LibHac/FsClient/FileSystemClient.Directory.cs b/src/LibHac/FsClient/FileSystemClient.Directory.cs new file mode 100644 index 00000000..e72d67c2 --- /dev/null +++ b/src/LibHac/FsClient/FileSystemClient.Directory.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using LibHac.Fs; + +namespace LibHac.FsClient +{ + public partial class FileSystemClient + { + public Result GetDirectoryEntryCount(out long count, DirectoryHandle handle) + { + throw new NotImplementedException(); + } + + // todo: change to not use IEnumerable + public IEnumerable ReadDirectory(DirectoryHandle handle) + { + throw new NotImplementedException(); + } + + public void CloseDirectory(DirectoryHandle handle) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/LibHac/FsClient/FileSystemClient.File.cs b/src/LibHac/FsClient/FileSystemClient.File.cs new file mode 100644 index 00000000..b4b13a0f --- /dev/null +++ b/src/LibHac/FsClient/FileSystemClient.File.cs @@ -0,0 +1,58 @@ +using System; +using LibHac.Fs; + +namespace LibHac.FsClient +{ + public partial class FileSystemClient + { + public Result ReadFile(FileHandle handle, long offset, Span destination) + { + throw new NotImplementedException(); + } + + public Result ReadFile(FileHandle handle, long offset, Span destination, ReadOption options) + { + throw new NotImplementedException(); + } + + public Result ReadFile(out long bytesRead, FileHandle handle, long offset, Span destination) + { + throw new NotImplementedException(); + } + + public Result ReadFile(out long bytesRead, FileHandle handle, long offset, Span destination, ReadOption options) + { + throw new NotImplementedException(); + } + + public Result WriteFile(FileHandle handle, long offset, ReadOnlySpan source, WriteOption options) + { + throw new NotImplementedException(); + } + + public Result FlushFile(FileHandle handle) + { + throw new NotImplementedException(); + } + + public Result GetFileSize(out long size, FileHandle handle) + { + throw new NotImplementedException(); + } + + public Result SetFileSize(FileHandle handle, long size) + { + throw new NotImplementedException(); + } + + public OpenMode GetFileOpenMode(FileHandle handle) + { + throw new NotImplementedException(); + } + + public void CloseFile(FileHandle handle) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/LibHac/FsClient/FileSystemClient.FileSystem.cs b/src/LibHac/FsClient/FileSystemClient.FileSystem.cs new file mode 100644 index 00000000..f3676a12 --- /dev/null +++ b/src/LibHac/FsClient/FileSystemClient.FileSystem.cs @@ -0,0 +1,83 @@ +using System; +using LibHac.Fs; + +namespace LibHac.FsClient +{ + public partial class FileSystemClient + { + public Result CreateDirectory(string path) + { + throw new NotImplementedException(); + } + + public Result CreateFile(string path, long size) + { + throw new NotImplementedException(); + } + + public Result CreateFile(string path, long size, CreateFileOptions options) + { + throw new NotImplementedException(); + } + + public Result DeleteDirectory(string path) + { + throw new NotImplementedException(); + } + + public Result DeleteDirectoryRecursively(string path) + { + throw new NotImplementedException(); + } + + public Result CleanDirectoryRecursively(string path) + { + throw new NotImplementedException(); + } + + public Result DeleteFile(string path) + { + throw new NotImplementedException(); + } + + public Result RenameDirectory(string oldPath, string newPath) + { + throw new NotImplementedException(); + } + + public Result RenameFile(string oldPath, string newPath) + { + throw new NotImplementedException(); + } + + public Result GetEntryType(out DirectoryEntryType type, string path) + { + throw new NotImplementedException(); + } + + public FileHandle OpenFile(out FileHandle handle, string path, OpenMode mode) + { + throw new NotImplementedException(); + } + + public DirectoryHandle OpenDirectory(out DirectoryHandle handle, string path, OpenDirectoryMode mode) + { + throw new NotImplementedException(); + } + + public Result GetFreeSpaceSize(out long size, string path) + { + throw new NotImplementedException(); + } + + public Result GetTotalSpaceSize(out long size, string path) + { + throw new NotImplementedException(); + } + + public Result Commit(string mountName) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/src/LibHac/FsClient/FileSystemClient.cs b/src/LibHac/FsClient/FileSystemClient.cs index 9076769a..e5cfb5b8 100644 --- a/src/LibHac/FsClient/FileSystemClient.cs +++ b/src/LibHac/FsClient/FileSystemClient.cs @@ -2,7 +2,7 @@ namespace LibHac.FsClient { - public class FileSystemClient + public partial class FileSystemClient { private FileSystemServer FsSrv { get; } private FileSystemProxy FsProxy { get; set; } diff --git a/src/LibHac/FsClient/FileSystemManagerUtils.cs b/src/LibHac/FsClient/FileSystemManagerUtils.cs index 85a5b7fe..bce4b6e4 100644 --- a/src/LibHac/FsClient/FileSystemManagerUtils.cs +++ b/src/LibHac/FsClient/FileSystemManagerUtils.cs @@ -2,7 +2,6 @@ using System.Buffers; using System.Collections.Generic; using LibHac.Fs; -using LibHac.FsClient.Accessors; namespace LibHac.FsClient { diff --git a/src/hactoolnet/FsUtils.cs b/src/hactoolnet/FsUtils.cs index 4aba3927..0f41f501 100644 --- a/src/hactoolnet/FsUtils.cs +++ b/src/hactoolnet/FsUtils.cs @@ -3,7 +3,6 @@ using System.Buffers; using LibHac; using LibHac.Fs; using LibHac.FsClient; -using LibHac.FsClient.Accessors; namespace hactoolnet {