From dd542491250cee9071558e56ffd27d3a1f60a8cd Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Sat, 6 Jun 2020 15:20:02 -0700 Subject: [PATCH] Rename FileBase "Impl" methods --- src/LibHac/Fs/Accessors/FileAccessor.cs | 10 +++---- src/LibHac/Fs/FileBase.cs | 26 +++++++++---------- src/LibHac/Fs/InMemoryFileSystem.cs | 10 +++---- src/LibHac/FsSystem/AesXtsFile.cs | 12 ++++----- src/LibHac/FsSystem/ConcatenationFile.cs | 10 +++---- src/LibHac/FsSystem/DirectorySaveDataFile.cs | 10 +++---- src/LibHac/FsSystem/LocalFile.cs | 10 +++---- src/LibHac/FsSystem/NullFile.cs | 10 +++---- src/LibHac/FsSystem/PartitionFile.cs | 10 +++---- .../FsSystem/PartitionFileSystemCore.cs | 12 ++++----- src/LibHac/FsSystem/ReadOnlyFile.cs | 10 +++---- src/LibHac/FsSystem/RomFs/RomFsFile.cs | 10 +++---- src/LibHac/FsSystem/Save/SaveDataFile.cs | 12 ++++----- src/LibHac/FsSystem/StorageFile.cs | 12 ++++----- src/LibHac/FsSystem/StreamFile.cs | 10 +++---- 15 files changed, 87 insertions(+), 87 deletions(-) diff --git a/src/LibHac/Fs/Accessors/FileAccessor.cs b/src/LibHac/Fs/Accessors/FileAccessor.cs index b9ba38a5..6ccca63b 100644 --- a/src/LibHac/Fs/Accessors/FileAccessor.cs +++ b/src/LibHac/Fs/Accessors/FileAccessor.cs @@ -17,14 +17,14 @@ namespace LibHac.Fs.Accessors OpenMode = mode; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { CheckIfDisposed(); return File.Read(out bytesRead, offset, destination, options); } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { CheckIfDisposed(); @@ -45,7 +45,7 @@ namespace LibHac.Fs.Accessors return rc; } - protected override Result FlushImpl() + protected override Result DoFlush() { CheckIfDisposed(); @@ -59,14 +59,14 @@ namespace LibHac.Fs.Accessors return rc; } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { CheckIfDisposed(); return File.GetSize(out size); } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { CheckIfDisposed(); diff --git a/src/LibHac/Fs/FileBase.cs b/src/LibHac/Fs/FileBase.cs index ba21abca..5f521f97 100644 --- a/src/LibHac/Fs/FileBase.cs +++ b/src/LibHac/Fs/FileBase.cs @@ -9,13 +9,13 @@ namespace LibHac.Fs private int _disposedState; private bool IsDisposed => _disposedState != 0; - protected abstract Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options); - protected abstract Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options); - protected abstract Result FlushImpl(); - protected abstract Result SetSizeImpl(long size); - protected abstract Result GetSizeImpl(out long size); + protected abstract Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options); + protected abstract Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options); + protected abstract Result DoFlush(); + protected abstract Result DoSetSize(long size); + protected abstract Result DoGetSize(out long size); - protected virtual Result OperateRangeImpl(Span outBuffer, OperationId operationId, long offset, long size, + protected virtual Result DoOperateRange(Span outBuffer, OperationId operationId, long offset, long size, ReadOnlySpan inBuffer) { return ResultFs.NotImplemented.Log(); @@ -31,7 +31,7 @@ namespace LibHac.Fs if (offset < 0) return ResultFs.OutOfRange.Log(); if (long.MaxValue - offset < destination.Length) return ResultFs.OutOfRange.Log(); - return ReadImpl(out bytesRead, offset, destination, options); + return DoRead(out bytesRead, offset, destination, options); } public Result Write(long offset, ReadOnlySpan source, WriteOptionFlag options) @@ -42,7 +42,7 @@ namespace LibHac.Fs { if (options.HasFlag(WriteOptionFlag.Flush)) { - return FlushImpl(); + return DoFlush(); } return Result.Success; @@ -51,14 +51,14 @@ namespace LibHac.Fs if (offset < 0) return ResultFs.OutOfRange.Log(); if (long.MaxValue - offset < source.Length) return ResultFs.OutOfRange.Log(); - return WriteImpl(offset, source, options); + return DoWrite(offset, source, options); } public Result Flush() { if (IsDisposed) return ResultFs.PreconditionViolation.Log(); - return FlushImpl(); + return DoFlush(); } public Result SetSize(long size) @@ -66,7 +66,7 @@ namespace LibHac.Fs if (IsDisposed) return ResultFs.PreconditionViolation.Log(); if (size < 0) return ResultFs.OutOfRange.Log(); - return SetSizeImpl(size); + return DoSetSize(size); } public Result GetSize(out long size) @@ -77,7 +77,7 @@ namespace LibHac.Fs return ResultFs.PreconditionViolation.Log(); } - return GetSizeImpl(out size); + return DoGetSize(out size); } public Result OperateRange(Span outBuffer, OperationId operationId, long offset, long size, @@ -85,7 +85,7 @@ namespace LibHac.Fs { if (IsDisposed) return ResultFs.PreconditionViolation.Log(); - return OperateRangeImpl(outBuffer, operationId, offset, size, inBuffer); + return DoOperateRange(outBuffer, operationId, offset, size, inBuffer); } public void Dispose() diff --git a/src/LibHac/Fs/InMemoryFileSystem.cs b/src/LibHac/Fs/InMemoryFileSystem.cs index a238667a..d74b567a 100644 --- a/src/LibHac/Fs/InMemoryFileSystem.cs +++ b/src/LibHac/Fs/InMemoryFileSystem.cs @@ -180,7 +180,7 @@ namespace LibHac.Fs Mode = mode; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { if (!Mode.HasFlag(OpenMode.Read)) { @@ -191,7 +191,7 @@ namespace LibHac.Fs return BaseStream.Read(out bytesRead, offset, destination); } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { if (!Mode.HasFlag(OpenMode.Write)) { @@ -201,17 +201,17 @@ namespace LibHac.Fs return BaseStream.Write(offset, source, Mode.HasFlag(OpenMode.AllowAppend)); } - protected override Result FlushImpl() + protected override Result DoFlush() { return BaseStream.Flush(); } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { return BaseStream.SetSize(size); } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { return BaseStream.GetSize(out size); } diff --git a/src/LibHac/FsSystem/AesXtsFile.cs b/src/LibHac/FsSystem/AesXtsFile.cs index 3982ef51..391fa2b0 100644 --- a/src/LibHac/FsSystem/AesXtsFile.cs +++ b/src/LibHac/FsSystem/AesXtsFile.cs @@ -54,7 +54,7 @@ namespace LibHac.FsSystem return key; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = default; @@ -68,14 +68,14 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { Result rc = ValidateWriteParams(offset, source.Length, Mode, out bool isResizeNeeded); if (rc.IsFailure()) return rc; if (isResizeNeeded) { - rc = SetSizeImpl(offset + source.Length); + rc = DoSetSize(offset + source.Length); if (rc.IsFailure()) return rc; } @@ -90,18 +90,18 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result FlushImpl() + protected override Result DoFlush() { return BaseStorage.Flush(); } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { size = Header.Size; return Result.Success; } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { Header.SetSize(size, VerificationKey); diff --git a/src/LibHac/FsSystem/ConcatenationFile.cs b/src/LibHac/FsSystem/ConcatenationFile.cs index a508620c..3f752a1c 100644 --- a/src/LibHac/FsSystem/ConcatenationFile.cs +++ b/src/LibHac/FsSystem/ConcatenationFile.cs @@ -34,7 +34,7 @@ namespace LibHac.FsSystem } } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = default; @@ -70,7 +70,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { Result rc = ValidateWriteParams(offset, source.Length, Mode, out _); if (rc.IsFailure()) return rc; @@ -107,7 +107,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result FlushImpl() + protected override Result DoFlush() { foreach (IFile file in Sources) { @@ -118,7 +118,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { size = default; @@ -133,7 +133,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { Result rc = GetSize(out long currentSize); if (rc.IsFailure()) return rc; diff --git a/src/LibHac/FsSystem/DirectorySaveDataFile.cs b/src/LibHac/FsSystem/DirectorySaveDataFile.cs index c578a09d..1ba9cd86 100644 --- a/src/LibHac/FsSystem/DirectorySaveDataFile.cs +++ b/src/LibHac/FsSystem/DirectorySaveDataFile.cs @@ -16,27 +16,27 @@ namespace LibHac.FsSystem Mode = mode; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { return BaseFile.Read(out bytesRead, offset, destination, options); } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { return BaseFile.Write(offset, source, options); } - protected override Result FlushImpl() + protected override Result DoFlush() { return BaseFile.Flush(); } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { return BaseFile.GetSize(out size); } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { return BaseFile.SetSize(size); } diff --git a/src/LibHac/FsSystem/LocalFile.cs b/src/LibHac/FsSystem/LocalFile.cs index cb47bdc9..d333ed7d 100644 --- a/src/LibHac/FsSystem/LocalFile.cs +++ b/src/LibHac/FsSystem/LocalFile.cs @@ -27,7 +27,7 @@ namespace LibHac.FsSystem File = new StreamFile(Stream, mode); } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = 0; @@ -37,7 +37,7 @@ namespace LibHac.FsSystem return File.Read(out bytesRead, offset, destination.Slice(0, (int)toRead), options); } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { Result rc = ValidateWriteParams(offset, source.Length, Mode, out _); if (rc.IsFailure()) return rc; @@ -45,7 +45,7 @@ namespace LibHac.FsSystem return File.Write(offset, source, options); } - protected override Result FlushImpl() + protected override Result DoFlush() { try { @@ -57,7 +57,7 @@ namespace LibHac.FsSystem } } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { try { @@ -70,7 +70,7 @@ namespace LibHac.FsSystem } } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { try { diff --git a/src/LibHac/FsSystem/NullFile.cs b/src/LibHac/FsSystem/NullFile.cs index 7a91e723..1ab3195c 100644 --- a/src/LibHac/FsSystem/NullFile.cs +++ b/src/LibHac/FsSystem/NullFile.cs @@ -16,7 +16,7 @@ namespace LibHac.FsSystem private long Length { get; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = 0; @@ -29,23 +29,23 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { return Result.Success; } - protected override Result FlushImpl() + protected override Result DoFlush() { return Result.Success; } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { size = Length; return Result.Success; } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { return ResultFs.UnsupportedOperation.Log(); } diff --git a/src/LibHac/FsSystem/PartitionFile.cs b/src/LibHac/FsSystem/PartitionFile.cs index fd40143f..7e9b2b9e 100644 --- a/src/LibHac/FsSystem/PartitionFile.cs +++ b/src/LibHac/FsSystem/PartitionFile.cs @@ -18,7 +18,7 @@ namespace LibHac.FsSystem Size = size; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = 0; @@ -32,7 +32,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { Result rc = ValidateWriteParams(offset, source.Length, Mode, out bool isResizeNeeded); if (rc.IsFailure()) return rc; @@ -53,7 +53,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result FlushImpl() + protected override Result DoFlush() { if (!Mode.HasFlag(OpenMode.Write)) { @@ -63,13 +63,13 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { size = Size; return Result.Success; } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { if (!Mode.HasFlag(OpenMode.Write)) { diff --git a/src/LibHac/FsSystem/PartitionFileSystemCore.cs b/src/LibHac/FsSystem/PartitionFileSystemCore.cs index ee8fc647..5c8555d0 100644 --- a/src/LibHac/FsSystem/PartitionFileSystemCore.cs +++ b/src/LibHac/FsSystem/PartitionFileSystemCore.cs @@ -123,7 +123,7 @@ namespace LibHac.FsSystem Mode = mode; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = default; @@ -240,7 +240,7 @@ namespace LibHac.FsSystem return rc; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { Result rc = ValidateWriteParams(offset, source.Length, Mode, out bool isResizeNeeded); if (rc.IsFailure()) return rc; @@ -257,7 +257,7 @@ namespace LibHac.FsSystem return ParentFs.BaseStorage.Write(ParentFs.DataOffset + _entry.Offset + offset, source); } - protected override Result FlushImpl() + protected override Result DoFlush() { if (Mode.HasFlag(OpenMode.Write)) { @@ -267,7 +267,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { if (Mode.HasFlag(OpenMode.Write)) { @@ -277,14 +277,14 @@ namespace LibHac.FsSystem return ResultFs.InvalidOpenModeForWrite.Log(); } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { size = _entry.Size; return Result.Success; } - protected override Result OperateRangeImpl(Span outBuffer, OperationId operationId, long offset, long size, ReadOnlySpan inBuffer) + protected override Result DoOperateRange(Span outBuffer, OperationId operationId, long offset, long size, ReadOnlySpan inBuffer) { switch (operationId) { diff --git a/src/LibHac/FsSystem/ReadOnlyFile.cs b/src/LibHac/FsSystem/ReadOnlyFile.cs index 037ae03f..a5bc4e44 100644 --- a/src/LibHac/FsSystem/ReadOnlyFile.cs +++ b/src/LibHac/FsSystem/ReadOnlyFile.cs @@ -12,27 +12,27 @@ namespace LibHac.FsSystem BaseFile = baseFile; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { return BaseFile.Read(out bytesRead, offset, destination, options); } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { return BaseFile.GetSize(out size); } - protected override Result FlushImpl() + protected override Result DoFlush() { return Result.Success; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { return ResultFs.InvalidOpenModeForWrite.Log(); } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { return ResultFs.InvalidOpenModeForWrite.Log(); } diff --git a/src/LibHac/FsSystem/RomFs/RomFsFile.cs b/src/LibHac/FsSystem/RomFs/RomFsFile.cs index e4c6fb08..0d7c1809 100644 --- a/src/LibHac/FsSystem/RomFs/RomFsFile.cs +++ b/src/LibHac/FsSystem/RomFs/RomFsFile.cs @@ -16,7 +16,7 @@ namespace LibHac.FsSystem.RomFs Size = size; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = default; @@ -33,23 +33,23 @@ namespace LibHac.FsSystem.RomFs return Result.Success; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { return ResultFs.UnsupportedOperationModifyRomFsFile.Log(); } - protected override Result FlushImpl() + protected override Result DoFlush() { return Result.Success; } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { size = Size; return Result.Success; } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { return ResultFs.UnsupportedOperationModifyRomFsFile.Log(); } diff --git a/src/LibHac/FsSystem/Save/SaveDataFile.cs b/src/LibHac/FsSystem/Save/SaveDataFile.cs index 300d2555..fa30796f 100644 --- a/src/LibHac/FsSystem/Save/SaveDataFile.cs +++ b/src/LibHac/FsSystem/Save/SaveDataFile.cs @@ -22,7 +22,7 @@ namespace LibHac.FsSystem.Save Size = size; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = default; @@ -42,14 +42,14 @@ namespace LibHac.FsSystem.Save return Result.Success; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { Result rc = ValidateWriteParams(offset, source.Length, Mode, out bool isResizeNeeded); if (rc.IsFailure()) return rc; if (isResizeNeeded) { - rc = SetSizeImpl(offset + source.Length); + rc = DoSetSize(offset + source.Length); if (rc.IsFailure()) return rc; } @@ -63,18 +63,18 @@ namespace LibHac.FsSystem.Save return Result.Success; } - protected override Result FlushImpl() + protected override Result DoFlush() { return BaseStorage.Flush(); } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { size = Size; return Result.Success; } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { if (size < 0) throw new ArgumentOutOfRangeException(nameof(size)); if (Size == size) return Result.Success; diff --git a/src/LibHac/FsSystem/StorageFile.cs b/src/LibHac/FsSystem/StorageFile.cs index eeeb4511..ce55682e 100644 --- a/src/LibHac/FsSystem/StorageFile.cs +++ b/src/LibHac/FsSystem/StorageFile.cs @@ -14,7 +14,7 @@ namespace LibHac.FsSystem Mode = mode; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = default; @@ -34,14 +34,14 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { Result rc = ValidateWriteParams(offset, source.Length, Mode, out bool isResizeNeeded); if (rc.IsFailure()) return rc; if (isResizeNeeded) { - rc = SetSizeImpl(offset + source.Length); + rc = DoSetSize(offset + source.Length); if (rc.IsFailure()) return rc; } @@ -56,7 +56,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result FlushImpl() + protected override Result DoFlush() { if (!Mode.HasFlag(OpenMode.Write)) return Result.Success; @@ -64,12 +64,12 @@ namespace LibHac.FsSystem return BaseStorage.Flush(); } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { return BaseStorage.GetSize(out size); } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { if (!Mode.HasFlag(OpenMode.Write)) return ResultFs.InvalidOpenModeForWrite.Log(); diff --git a/src/LibHac/FsSystem/StreamFile.cs b/src/LibHac/FsSystem/StreamFile.cs index ee915679..b1e652cb 100644 --- a/src/LibHac/FsSystem/StreamFile.cs +++ b/src/LibHac/FsSystem/StreamFile.cs @@ -21,7 +21,7 @@ namespace LibHac.FsSystem Mode = mode; } - protected override Result ReadImpl(out long bytesRead, long offset, Span destination, ReadOptionFlag options) + protected override Result DoRead(out long bytesRead, long offset, Span destination, ReadOptionFlag options) { bytesRead = default; @@ -40,7 +40,7 @@ namespace LibHac.FsSystem } } - protected override Result WriteImpl(long offset, ReadOnlySpan source, WriteOptionFlag options) + protected override Result DoWrite(long offset, ReadOnlySpan source, WriteOptionFlag options) { Result rc = ValidateWriteParams(offset, source.Length, Mode, out _); if (rc.IsFailure()) return rc; @@ -59,7 +59,7 @@ namespace LibHac.FsSystem return Result.Success; } - protected override Result FlushImpl() + protected override Result DoFlush() { lock (Locker) { @@ -68,7 +68,7 @@ namespace LibHac.FsSystem } } - protected override Result GetSizeImpl(out long size) + protected override Result DoGetSize(out long size) { lock (Locker) { @@ -77,7 +77,7 @@ namespace LibHac.FsSystem } } - protected override Result SetSizeImpl(long size) + protected override Result DoSetSize(long size) { lock (Locker) {