diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2025-01-01 17:41:17 -0600 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2025-01-01 17:41:17 -0600 |
commit | 16379362c02a2472f00fac49cad62788547c9519 (patch) | |
tree | 9b7f42acbba8dd259a536287a2b130e92ad2e2c7 /include/fud_file.hpp | |
parent | 012df4bc38777c9053353ec2c4213bba67d63ab4 (diff) |
Add CSV parsing, printing, fix buffered file reading.
Diffstat (limited to 'include/fud_file.hpp')
-rw-r--r-- | include/fud_file.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/fud_file.hpp b/include/fud_file.hpp index 82f8291..e7c485c 100644 --- a/include/fud_file.hpp +++ b/include/fud_file.hpp @@ -197,6 +197,10 @@ class BufferedRegularFile { FudStatus close(bool discardBuffer); + Result<size_t, FudStatus> size() const { + return m_file.size(); + } + /** \brief Write from source to file as sink. */ DrainResult write(const std::byte* source, size_t length, Option<size_t> maxExtraAttempts); @@ -217,6 +221,8 @@ class BufferedRegularFile { FudStatus seek(size_t position); + Result<size_t, FudStatus> searchSubstring(StringView subString); + constexpr const RegularFile& file() const { return m_file; |