summaryrefslogtreecommitdiff
path: root/include/fud_file.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/fud_file.hpp')
-rw-r--r--include/fud_file.hpp11
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()};