From e8422002f84dc4313894a5b3136c44a9005081fd Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sat, 2 Nov 2024 20:45:02 -0500 Subject: Allocator deallocate is void rather than returning FudStatus. --- include/fud_file.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include/fud_file.hpp') diff --git a/include/fud_file.hpp b/include/fud_file.hpp index 51826a6..7a53468 100644 --- a/include/fud_file.hpp +++ b/include/fud_file.hpp @@ -165,10 +165,17 @@ class RegularFile { FileAccessMode m_modeFlags{}; }; +enum class ReadPolicy { + Unbuffered, + ReadAhead, +}; + class BufferedRegularFile { public: - DrainResult write(const void* source, size_t sourceSize, size_t length, size_t offset); - // DrainResult read(void* sink, ); + /** \brief Write from source to file as sink. */ + DrainResult write(const std::byte* source, size_t sourceSize, size_t length, size_t offset); + /** \brief Read from file as source to sink. */ + DrainResult read(std::byte* sink, size_t sinkSize, size_t length, size_t offset); private: Vector m_readBuffer{Vector::NullVector()}; Vector m_writeBuffer{Vector::NullVector()}; -- cgit v1.2.3