From ef99a1cf5aba11c0bf12c17966c40ef7abe47332 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 21 Dec 2022 20:03:10 +0000 Subject: [PATCH] Replace ReadDir method with one that uses IDirNode. --- Interfaces/IReadOnlyFilesystem.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Interfaces/IReadOnlyFilesystem.cs b/Interfaces/IReadOnlyFilesystem.cs index f1cc3e2..d2910c8 100644 --- a/Interfaces/IReadOnlyFilesystem.cs +++ b/Interfaces/IReadOnlyFilesystem.cs @@ -96,11 +96,6 @@ public interface IReadOnlyFilesystem : IFilesystem /// Buffer. ErrorNumber GetXattr(string path, string xattr, ref byte[] buf); - /// Lists contents from a directory. - /// Directory path. - /// Directory contents. - ErrorNumber ReadDir(string path, out List contents); - /// Gets information about the mounted volume. /// Information about the mounted volume. ErrorNumber StatFs(out FileSystemInfo stat); @@ -171,6 +166,14 @@ public interface IReadOnlyFilesystem : IFilesystem /// The directory node. /// Error number. ErrorNumber CloseDir(IDirNode node); + + /// Reads the next entry in the directory. + /// Represent an opened directory. + /// The next entry name. + /// null + /// if there are no more entries. + /// Error number. + ErrorNumber ReadDir(IDirNode node, out string filename); } /// Represents an opened file from a filesystem