diff --git a/src/LibHac/Fs/Fsa/IFileSystem.cs b/src/LibHac/Fs/Fsa/IFileSystem.cs index 9eb3f479..8ab4a061 100644 --- a/src/LibHac/Fs/Fsa/IFileSystem.cs +++ b/src/LibHac/Fs/Fsa/IFileSystem.cs @@ -157,52 +157,52 @@ namespace LibHac.Fs.Fsa /// /// Renames or moves a file to a new location. /// - /// The full path of the file to rename. + /// The full path of the file to rename. /// The new full path of the file. /// The of the requested operation. /// - /// If and are the same, this function does nothing and returns successfully. + /// If and are the same, this function does nothing and returns successfully. /// The following codes may be returned under certain conditions: /// - /// does not exist or is a directory: + /// does not exist or is a directory: /// 's parent directory does not exist: /// already exists as either a file or directory: /// - public Result RenameFile(U8Span oldPath, U8Span newPath) + public Result RenameFile(U8Span currentPath, U8Span newPath) { - if (oldPath.IsNull()) + if (currentPath.IsNull()) return ResultFs.NullptrArgument.Log(); if (newPath.IsNull()) return ResultFs.NullptrArgument.Log(); - return DoRenameFile(oldPath, newPath); + return DoRenameFile(currentPath, newPath); } /// /// Renames or moves a directory to a new location. /// - /// The full path of the directory to rename. + /// The full path of the directory to rename. /// The new full path of the directory. /// The of the requested operation. /// - /// If and are the same, this function does nothing and returns . + /// If and are the same, this function does nothing and returns . /// The following codes may be returned under certain conditions: /// - /// does not exist or is a file: + /// does not exist or is a file: /// 's parent directory does not exist: /// already exists as either a file or directory: - /// Either or is a subpath of the other: + /// Either or is a subpath of the other: /// - public Result RenameDirectory(U8Span oldPath, U8Span newPath) + public Result RenameDirectory(U8Span currentPath, U8Span newPath) { - if (oldPath.IsNull()) + if (currentPath.IsNull()) return ResultFs.NullptrArgument.Log(); if (newPath.IsNull()) return ResultFs.NullptrArgument.Log(); - return DoRenameDirectory(oldPath, newPath); + return DoRenameDirectory(currentPath, newPath); } /// @@ -387,8 +387,8 @@ namespace LibHac.Fs.Fsa protected abstract Result DoDeleteDirectory(U8Span path); protected abstract Result DoDeleteDirectoryRecursively(U8Span path); protected abstract Result DoCleanDirectoryRecursively(U8Span path); - protected abstract Result DoRenameFile(U8Span oldPath, U8Span newPath); - protected abstract Result DoRenameDirectory(U8Span oldPath, U8Span newPath); + protected abstract Result DoRenameFile(U8Span currentPath, U8Span newPath); + protected abstract Result DoRenameDirectory(U8Span currentPath, U8Span newPath); protected abstract Result DoGetEntryType(out DirectoryEntryType entryType, U8Span path); protected virtual Result DoGetFreeSpaceSize(out long freeSpace, U8Span path) diff --git a/src/LibHac/Fs/Impl/FileSystemServiceObjectAdapter.cs b/src/LibHac/Fs/Impl/FileSystemServiceObjectAdapter.cs index 6901fe51..f41819b5 100644 --- a/src/LibHac/Fs/Impl/FileSystemServiceObjectAdapter.cs +++ b/src/LibHac/Fs/Impl/FileSystemServiceObjectAdapter.cs @@ -71,9 +71,9 @@ namespace LibHac.Fs.Impl return BaseFs.Target.CleanDirectoryRecursively(in sfPath); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { - Result rc = GetPathForServiceObject(out PathSf oldSfPath, oldPath); + Result rc = GetPathForServiceObject(out PathSf oldSfPath, currentPath); if (rc.IsFailure()) return rc; rc = GetPathForServiceObject(out PathSf newSfPath, newPath); @@ -82,9 +82,9 @@ namespace LibHac.Fs.Impl return BaseFs.Target.RenameFile(in oldSfPath, in newSfPath); } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { - Result rc = GetPathForServiceObject(out PathSf oldSfPath, oldPath); + Result rc = GetPathForServiceObject(out PathSf oldSfPath, currentPath); if (rc.IsFailure()) return rc; rc = GetPathForServiceObject(out PathSf newSfPath, newPath); diff --git a/src/LibHac/Fs/InMemoryFileSystem.cs b/src/LibHac/Fs/InMemoryFileSystem.cs index 7fa0fd7c..fa128148 100644 --- a/src/LibHac/Fs/InMemoryFileSystem.cs +++ b/src/LibHac/Fs/InMemoryFileSystem.cs @@ -46,7 +46,7 @@ namespace LibHac.Fs return Result.Success; } - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) { Unsafe.SkipInit(out FsPath normalizedPath); Result rc = PathNormalizer.Normalize(normalizedPath.Str, out _, path, false, false); diff --git a/src/LibHac/FsSrv/Impl/IResultConvertFileSystem.cs b/src/LibHac/FsSrv/Impl/IResultConvertFileSystem.cs index f5f516ef..3baf69fa 100644 --- a/src/LibHac/FsSrv/Impl/IResultConvertFileSystem.cs +++ b/src/LibHac/FsSrv/Impl/IResultConvertFileSystem.cs @@ -145,14 +145,14 @@ namespace LibHac.FsSrv.Impl return ConvertResult(BaseFileSystem.Target.CleanDirectoryRecursively(path)); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { - return ConvertResult(BaseFileSystem.Target.RenameFile(oldPath, newPath)); + return ConvertResult(BaseFileSystem.Target.RenameFile(currentPath, newPath)); } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { - return ConvertResult(BaseFileSystem.Target.RenameDirectory(oldPath, newPath)); + return ConvertResult(BaseFileSystem.Target.RenameDirectory(currentPath, newPath)); } protected override Result DoGetEntryType(out DirectoryEntryType entryType, U8Span path) diff --git a/src/LibHac/FsSystem/AesXtsFileSystem.cs b/src/LibHac/FsSystem/AesXtsFileSystem.cs index 55702af7..3344fa87 100644 --- a/src/LibHac/FsSystem/AesXtsFileSystem.cs +++ b/src/LibHac/FsSystem/AesXtsFileSystem.cs @@ -48,9 +48,9 @@ namespace LibHac.FsSystem return BaseFileSystem.CreateDirectory(path); } - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) { - return CreateFile(path, size, options, new byte[0x20]); + return CreateFile(path, size, option, new byte[0x20]); } /// @@ -126,7 +126,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { // todo: Return proper result codes @@ -138,17 +138,17 @@ namespace LibHac.FsSystem // Reencrypt any modified file headers with the old path // Rename directory to the old path - Result rc = BaseFileSystem.RenameDirectory(oldPath, newPath); + Result rc = BaseFileSystem.RenameDirectory(currentPath, newPath); if (rc.IsFailure()) return rc; try { - RenameDirectoryImpl(oldPath.ToString(), newPath.ToString(), false); + RenameDirectoryImpl(currentPath.ToString(), newPath.ToString(), false); } catch (Exception) { - RenameDirectoryImpl(oldPath.ToString(), newPath.ToString(), true); - BaseFileSystem.RenameDirectory(oldPath, newPath); + RenameDirectoryImpl(currentPath.ToString(), newPath.ToString(), true); + BaseFileSystem.RenameDirectory(currentPath, newPath); throw; } @@ -186,13 +186,13 @@ namespace LibHac.FsSystem } } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { // todo: Return proper result codes - AesXtsFileHeader header = ReadXtsHeader(oldPath.ToString(), oldPath.ToString()); + AesXtsFileHeader header = ReadXtsHeader(currentPath.ToString(), currentPath.ToString()); - Result rc = BaseFileSystem.RenameFile(oldPath, newPath); + Result rc = BaseFileSystem.RenameFile(currentPath, newPath); if (rc.IsFailure()) return rc; try @@ -201,8 +201,8 @@ namespace LibHac.FsSystem } catch (Exception) { - BaseFileSystem.RenameFile(newPath, oldPath); - WriteXtsHeader(header, oldPath.ToString(), oldPath.ToString()); + BaseFileSystem.RenameFile(newPath, currentPath); + WriteXtsHeader(header, currentPath.ToString(), currentPath.ToString()); throw; } diff --git a/src/LibHac/FsSystem/ApplicationTemporaryFileSystem.cs b/src/LibHac/FsSystem/ApplicationTemporaryFileSystem.cs index 831663cc..0412b9be 100644 --- a/src/LibHac/FsSystem/ApplicationTemporaryFileSystem.cs +++ b/src/LibHac/FsSystem/ApplicationTemporaryFileSystem.cs @@ -37,12 +37,12 @@ namespace LibHac.FsSystem throw new NotImplementedException(); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { throw new NotImplementedException(); } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { throw new NotImplementedException(); } diff --git a/src/LibHac/FsSystem/ConcatenationFileSystem.cs b/src/LibHac/FsSystem/ConcatenationFileSystem.cs index 1b4bc777..ccb8ea6f 100644 --- a/src/LibHac/FsSystem/ConcatenationFileSystem.cs +++ b/src/LibHac/FsSystem/ConcatenationFileSystem.cs @@ -112,11 +112,11 @@ namespace LibHac.FsSystem return BaseFileSystem.CreateDirectory(path); } - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) { - CreateFileOptions newOptions = options & ~CreateFileOptions.CreateConcatenationFile; + CreateFileOptions newOptions = option & ~CreateFileOptions.CreateConcatenationFile; - if (!options.HasFlag(CreateFileOptions.CreateConcatenationFile)) + if (!option.HasFlag(CreateFileOptions.CreateConcatenationFile)) { return BaseFileSystem.CreateFile(path, size, newOptions); } @@ -253,25 +253,25 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { - if (IsConcatenationFile(oldPath)) + if (IsConcatenationFile(currentPath)) { return ResultFs.PathNotFound.Log(); } - return BaseFileSystem.RenameDirectory(oldPath, newPath); + return BaseFileSystem.RenameDirectory(currentPath, newPath); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { - if (IsConcatenationFile(oldPath)) + if (IsConcatenationFile(currentPath)) { - return BaseFileSystem.RenameDirectory(oldPath, newPath); + return BaseFileSystem.RenameDirectory(currentPath, newPath); } else { - return BaseFileSystem.RenameFile(oldPath, newPath); + return BaseFileSystem.RenameFile(currentPath, newPath); } } diff --git a/src/LibHac/FsSystem/DirectorySaveDataFileSystem.cs b/src/LibHac/FsSystem/DirectorySaveDataFileSystem.cs index b0594734..8809c332 100644 --- a/src/LibHac/FsSystem/DirectorySaveDataFileSystem.cs +++ b/src/LibHac/FsSystem/DirectorySaveDataFileSystem.cs @@ -299,7 +299,7 @@ namespace LibHac.FsSystem return PathNormalizer.Normalize(outPath.Slice(2), out _, relativePath, false, false); } - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) { Unsafe.SkipInit(out FsPath fullPath); @@ -308,7 +308,7 @@ namespace LibHac.FsSystem using ScopedLock lk = ScopedLock.Lock(ref _mutex); - return _baseFs.CreateFile(fullPath, size, options); + return _baseFs.CreateFile(fullPath, size, option); } protected override Result DoDeleteFile(U8Span path) @@ -371,12 +371,12 @@ namespace LibHac.FsSystem return _baseFs.CleanDirectoryRecursively(fullPath); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { Unsafe.SkipInit(out FsPath fullCurrentPath); Unsafe.SkipInit(out FsPath fullNewPath); - Result rc = ResolveFullPath(fullCurrentPath.Str, oldPath); + Result rc = ResolveFullPath(fullCurrentPath.Str, currentPath); if (rc.IsFailure()) return rc; rc = ResolveFullPath(fullNewPath.Str, newPath); @@ -387,12 +387,12 @@ namespace LibHac.FsSystem return _baseFs.RenameFile(fullCurrentPath, fullNewPath); } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { Unsafe.SkipInit(out FsPath fullCurrentPath); Unsafe.SkipInit(out FsPath fullNewPath); - Result rc = ResolveFullPath(fullCurrentPath.Str, oldPath); + Result rc = ResolveFullPath(fullCurrentPath.Str, currentPath); if (rc.IsFailure()) return rc; rc = ResolveFullPath(fullNewPath.Str, newPath); diff --git a/src/LibHac/FsSystem/ForwardingFileSystem.cs b/src/LibHac/FsSystem/ForwardingFileSystem.cs index a230168c..0bcfbfa8 100644 --- a/src/LibHac/FsSystem/ForwardingFileSystem.cs +++ b/src/LibHac/FsSystem/ForwardingFileSystem.cs @@ -44,11 +44,11 @@ namespace LibHac.FsSystem protected override Result DoCleanDirectoryRecursively(U8Span path) => BaseFileSystem.Target.CleanDirectoryRecursively(path); - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) => - BaseFileSystem.Target.RenameFile(oldPath, newPath); + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) => + BaseFileSystem.Target.RenameFile(currentPath, newPath); - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) => - BaseFileSystem.Target.RenameDirectory(oldPath, newPath); + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) => + BaseFileSystem.Target.RenameDirectory(currentPath, newPath); protected override Result DoGetEntryType(out DirectoryEntryType entryType, U8Span path) => BaseFileSystem.Target.GetEntryType(out entryType, path); diff --git a/src/LibHac/FsSystem/LayeredFileSystem.cs b/src/LibHac/FsSystem/LayeredFileSystem.cs index f53059c3..af5cf0b2 100644 --- a/src/LibHac/FsSystem/LayeredFileSystem.cs +++ b/src/LibHac/FsSystem/LayeredFileSystem.cs @@ -194,13 +194,13 @@ namespace LibHac.FsSystem } protected override Result DoCreateDirectory(U8Span path) => ResultFs.UnsupportedOperation.Log(); - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) => ResultFs.UnsupportedOperation.Log(); + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) => ResultFs.UnsupportedOperation.Log(); protected override Result DoDeleteDirectory(U8Span path) => ResultFs.UnsupportedOperation.Log(); protected override Result DoDeleteDirectoryRecursively(U8Span path) => ResultFs.UnsupportedOperation.Log(); protected override Result DoCleanDirectoryRecursively(U8Span path) => ResultFs.UnsupportedOperation.Log(); protected override Result DoDeleteFile(U8Span path) => ResultFs.UnsupportedOperation.Log(); - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedOperation.Log(); - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedOperation.Log(); + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedOperation.Log(); + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedOperation.Log(); private class MergedDirectory : IDirectory { diff --git a/src/LibHac/FsSystem/LocalFileSystem.cs b/src/LibHac/FsSystem/LocalFileSystem.cs index 5a4686a8..7593a31f 100644 --- a/src/LibHac/FsSystem/LocalFileSystem.cs +++ b/src/LibHac/FsSystem/LocalFileSystem.cs @@ -252,7 +252,7 @@ namespace LibHac.FsSystem return CreateDirInternal(dir, archiveAttribute); } - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) { Result rc = ResolveFullPath(out string fullPath, path, false); if (rc.IsFailure()) return rc; @@ -400,12 +400,12 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { - Result rc = CheckSubPath(oldPath, newPath); + Result rc = CheckSubPath(currentPath, newPath); if (rc.IsFailure()) return rc; - rc = ResolveFullPath(out string fullCurrentPath, oldPath, true); + rc = ResolveFullPath(out string fullCurrentPath, currentPath, true); if (rc.IsFailure()) return rc; rc = ResolveFullPath(out string fullNewPath, newPath, false); @@ -424,9 +424,9 @@ namespace LibHac.FsSystem () => RenameDirInternal(currentDirInfo, newDirInfo), _fsClient); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { - Result rc = ResolveFullPath(out string fullCurrentPath, oldPath, true); + Result rc = ResolveFullPath(out string fullCurrentPath, currentPath, true); if (rc.IsFailure()) return rc; rc = ResolveFullPath(out string fullNewPath, newPath, false); diff --git a/src/LibHac/FsSystem/PartitionFileSystem.cs b/src/LibHac/FsSystem/PartitionFileSystem.cs index f453c642..280c8117 100644 --- a/src/LibHac/FsSystem/PartitionFileSystem.cs +++ b/src/LibHac/FsSystem/PartitionFileSystem.cs @@ -77,13 +77,13 @@ namespace LibHac.FsSystem } protected override Result DoCreateDirectory(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoDeleteDirectory(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoDeleteDirectoryRecursively(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoCleanDirectoryRecursively(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoDeleteFile(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoCommit() { diff --git a/src/LibHac/FsSystem/PartitionFileSystemCore.cs b/src/LibHac/FsSystem/PartitionFileSystemCore.cs index 480da5d4..0a0f0b9d 100644 --- a/src/LibHac/FsSystem/PartitionFileSystemCore.cs +++ b/src/LibHac/FsSystem/PartitionFileSystemCore.cs @@ -123,13 +123,13 @@ namespace LibHac.FsSystem } protected override Result DoCreateDirectory(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoDeleteDirectory(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoDeleteDirectoryRecursively(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoCleanDirectoryRecursively(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoDeleteFile(U8Span path) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedWriteForPartitionFileSystem.Log(); protected override Result DoCommitProvisionally(long counter) => ResultFs.UnsupportedCommitProvisionallyForPartitionFileSystem.Log(); private class PartitionFile : IFile diff --git a/src/LibHac/FsSystem/ReadOnlyFileSystem.cs b/src/LibHac/FsSystem/ReadOnlyFileSystem.cs index 80fed8ba..f2a0936b 100644 --- a/src/LibHac/FsSystem/ReadOnlyFileSystem.cs +++ b/src/LibHac/FsSystem/ReadOnlyFileSystem.cs @@ -77,7 +77,7 @@ namespace LibHac.FsSystem protected override Result DoCreateDirectory(U8Span path) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); protected override Result DoDeleteDirectory(U8Span path) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); @@ -87,9 +87,9 @@ namespace LibHac.FsSystem protected override Result DoDeleteFile(U8Span path) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedWriteForReadOnlyFileSystem.Log(); protected override void Dispose(bool disposing) { diff --git a/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs b/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs index ed228226..03e34d3d 100644 --- a/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs +++ b/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs @@ -87,13 +87,13 @@ namespace LibHac.FsSystem.RomFs } protected override Result DoCreateDirectory(U8Span path) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); protected override Result DoDeleteDirectory(U8Span path) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); protected override Result DoDeleteDirectoryRecursively(U8Span path) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); protected override Result DoCleanDirectoryRecursively(U8Span path) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); protected override Result DoDeleteFile(U8Span path) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) => ResultFs.UnsupportedWriteForRomFsFileSystem.Log(); protected override Result DoCommitProvisionally(long counter) => ResultFs.UnsupportedCommitProvisionallyForRomFsFileSystem.Log(); protected override Result DoGetFreeSpaceSize(out long freeSpace, U8Span path) diff --git a/src/LibHac/FsSystem/Save/SaveDataFileSystem.cs b/src/LibHac/FsSystem/Save/SaveDataFileSystem.cs index 01d2e10a..c447d4f0 100644 --- a/src/LibHac/FsSystem/Save/SaveDataFileSystem.cs +++ b/src/LibHac/FsSystem/Save/SaveDataFileSystem.cs @@ -153,9 +153,9 @@ namespace LibHac.FsSystem.Save return SaveResults.ConvertToExternalResult(result).LogConverted(result); } - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) { - Result result = SaveDataFileSystemCore.CreateFile(path, size, options); + Result result = SaveDataFileSystemCore.CreateFile(path, size, option); return SaveResults.ConvertToExternalResult(result).LogConverted(result); } @@ -202,16 +202,16 @@ namespace LibHac.FsSystem.Save return SaveResults.ConvertToExternalResult(result).LogConverted(result); } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { - Result result = SaveDataFileSystemCore.RenameDirectory(oldPath, newPath); + Result result = SaveDataFileSystemCore.RenameDirectory(currentPath, newPath); return SaveResults.ConvertToExternalResult(result).LogConverted(result); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { - Result result = SaveDataFileSystemCore.RenameFile(oldPath, newPath); + Result result = SaveDataFileSystemCore.RenameFile(currentPath, newPath); return SaveResults.ConvertToExternalResult(result).LogConverted(result); } diff --git a/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs b/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs index b6110e81..3060fad7 100644 --- a/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs +++ b/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs @@ -43,7 +43,7 @@ namespace LibHac.FsSystem.Save return Result.Success; } - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) { Unsafe.SkipInit(out FsPath normalizedPath); @@ -175,12 +175,12 @@ namespace LibHac.FsSystem.Save return Result.Success; } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { Unsafe.SkipInit(out FsPath normalizedCurrentPath); Unsafe.SkipInit(out FsPath normalizedNewPath); - Result rc = PathNormalizer.Normalize(normalizedCurrentPath.Str, out _, oldPath, false, false); + Result rc = PathNormalizer.Normalize(normalizedCurrentPath.Str, out _, currentPath, false, false); if (rc.IsFailure()) return rc; rc = PathNormalizer.Normalize(normalizedNewPath.Str, out _, newPath, false, false); @@ -189,12 +189,12 @@ namespace LibHac.FsSystem.Save return FileTable.RenameDirectory(normalizedCurrentPath, normalizedNewPath); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { Unsafe.SkipInit(out FsPath normalizedCurrentPath); Unsafe.SkipInit(out FsPath normalizedNewPath); - Result rc = PathNormalizer.Normalize(normalizedCurrentPath.Str, out _, oldPath, false, false); + Result rc = PathNormalizer.Normalize(normalizedCurrentPath.Str, out _, currentPath, false, false); if (rc.IsFailure()) return rc; rc = PathNormalizer.Normalize(normalizedNewPath.Str, out _, newPath, false, false); diff --git a/src/LibHac/FsSystem/SaveDataFileSystemCacheRegisterBase.cs b/src/LibHac/FsSystem/SaveDataFileSystemCacheRegisterBase.cs index 20d7f42e..ed34363b 100644 --- a/src/LibHac/FsSystem/SaveDataFileSystemCacheRegisterBase.cs +++ b/src/LibHac/FsSystem/SaveDataFileSystemCacheRegisterBase.cs @@ -143,14 +143,14 @@ namespace LibHac.FsSystem return _baseFileSystem.Target.CleanDirectoryRecursively(path); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { - return _baseFileSystem.Target.RenameFile(oldPath, newPath); + return _baseFileSystem.Target.RenameFile(currentPath, newPath); } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { - return _baseFileSystem.Target.RenameDirectory(oldPath, newPath); + return _baseFileSystem.Target.RenameDirectory(currentPath, newPath); } protected override Result DoCommit() diff --git a/src/LibHac/FsSystem/StorageLayoutTypeSetFileSystem.cs b/src/LibHac/FsSystem/StorageLayoutTypeSetFileSystem.cs index fb089897..3946ef64 100644 --- a/src/LibHac/FsSystem/StorageLayoutTypeSetFileSystem.cs +++ b/src/LibHac/FsSystem/StorageLayoutTypeSetFileSystem.cs @@ -85,16 +85,16 @@ namespace LibHac.FsSystem return BaseFileSystem.Target.CleanDirectoryRecursively(path); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { using var scopedLayoutType = new ScopedStorageLayoutTypeSetter(StorageFlag); - return BaseFileSystem.Target.RenameFile(oldPath, newPath); + return BaseFileSystem.Target.RenameFile(currentPath, newPath); } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { using var scopedLayoutType = new ScopedStorageLayoutTypeSetter(StorageFlag); - return BaseFileSystem.Target.RenameDirectory(oldPath, newPath); + return BaseFileSystem.Target.RenameDirectory(currentPath, newPath); } protected override Result DoGetEntryType(out DirectoryEntryType entryType, U8Span path) diff --git a/src/LibHac/FsSystem/SubdirectoryFileSystem.cs b/src/LibHac/FsSystem/SubdirectoryFileSystem.cs index a3bc8e69..57322116 100644 --- a/src/LibHac/FsSystem/SubdirectoryFileSystem.cs +++ b/src/LibHac/FsSystem/SubdirectoryFileSystem.cs @@ -102,13 +102,13 @@ namespace LibHac.FsSystem return BaseFileSystem.CreateDirectory(new U8Span(fullPath)); } - protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options) + protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions option) { Span fullPath = stackalloc byte[PathTools.MaxPathLength + 1]; Result rc = ResolveFullPath(fullPath, path); if (rc.IsFailure()) return rc; - return BaseFileSystem.CreateFile(new U8Span(fullPath), size, options); + return BaseFileSystem.CreateFile(new U8Span(fullPath), size, option); } protected override Result DoDeleteDirectory(U8Span path) @@ -169,12 +169,12 @@ namespace LibHac.FsSystem return BaseFileSystem.OpenFile(out file, new U8Span(fullPath), mode); } - protected override Result DoRenameDirectory(U8Span oldPath, U8Span newPath) + protected override Result DoRenameDirectory(U8Span currentPath, U8Span newPath) { Span fullOldPath = stackalloc byte[PathTools.MaxPathLength + 1]; Span fullNewPath = stackalloc byte[PathTools.MaxPathLength + 1]; - Result rc = ResolveFullPath(fullOldPath, oldPath); + Result rc = ResolveFullPath(fullOldPath, currentPath); if (rc.IsFailure()) return rc; rc = ResolveFullPath(fullNewPath, newPath); @@ -183,12 +183,12 @@ namespace LibHac.FsSystem return BaseFileSystem.RenameDirectory(new U8Span(fullOldPath), new U8Span(fullNewPath)); } - protected override Result DoRenameFile(U8Span oldPath, U8Span newPath) + protected override Result DoRenameFile(U8Span currentPath, U8Span newPath) { Span fullOldPath = stackalloc byte[PathTools.MaxPathLength + 1]; Span fullNewPath = stackalloc byte[PathTools.MaxPathLength + 1]; - Result rc = ResolveFullPath(fullOldPath, oldPath); + Result rc = ResolveFullPath(fullOldPath, currentPath); if (rc.IsFailure()) return rc; rc = ResolveFullPath(fullNewPath, newPath);