diff options
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; |