diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-11-02 20:45:02 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-11-02 20:45:02 -0500 |
commit | e8422002f84dc4313894a5b3136c44a9005081fd (patch) | |
tree | b41633d9f759306fe9c7c01e209780222b47f5df /include/fud_file.hpp | |
parent | 6c7fd1db481ff10a16ecab958c6542784fa60b9c (diff) |
Allocator deallocate is void rather than returning FudStatus.
Diffstat (limited to 'include/fud_file.hpp')
-rw-r--r-- | include/fud_file.hpp | 11 |
1 files changed, 9 insertions, 2 deletions
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<std::byte> m_readBuffer{Vector<std::byte>::NullVector()}; Vector<std::byte> m_writeBuffer{Vector<std::byte>::NullVector()}; |