From c723c09aaad90b73b737aa2003c21bc17fa97b5f Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 19 Dec 2022 11:02:31 +0000 Subject: [PATCH] Replace Read method with ReadFile method that uses the file node in IFileSystem. --- Interfaces/IReadOnlyFilesystem.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Interfaces/IReadOnlyFilesystem.cs b/Interfaces/IReadOnlyFilesystem.cs index 1189aba..c17ec61 100644 --- a/Interfaces/IReadOnlyFilesystem.cs +++ b/Interfaces/IReadOnlyFilesystem.cs @@ -103,13 +103,6 @@ public interface IReadOnlyFilesystem : IFilesystem /// Buffer. ErrorNumber GetXattr(string path, string xattr, ref byte[] buf); - /// Reads data from a file (main/only data stream or data fork). - /// File path. - /// Offset. - /// Bytes to read. - /// Buffer. - ErrorNumber Read(string path, long offset, long size, ref byte[] buf); - /// Lists contents from a directory. /// Directory path. /// Directory contents. @@ -167,6 +160,13 @@ public interface IReadOnlyFilesystem : IFilesystem return ErrorNumber.NoError; } + + /// Reads data from a file (main/only data stream or data fork). + /// File node. + /// Bytes to read. + /// Buffer. Must exist and be of size equal or bigger than + /// How many bytes were read into the buffer + ErrorNumber ReadFile(IFileNode node, long length, byte[] buffer, out long read); } /// Represents an opened file from a filesystem