aboutsummaryrefslogtreecommitdiff
path: root/libbutl/fdstream.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/fdstream.hxx')
-rw-r--r--libbutl/fdstream.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/libbutl/fdstream.hxx b/libbutl/fdstream.hxx
index a8f203d..771d242 100644
--- a/libbutl/fdstream.hxx
+++ b/libbutl/fdstream.hxx
@@ -5,6 +5,7 @@
#ifndef LIBBUTL_FDSTREAM_HXX
#define LIBBUTL_FDSTREAM_HXX
+#include <vector>
#include <string>
#include <istream>
#include <ostream>
@@ -398,6 +399,17 @@ namespace butl
auto_fd release (); // Note: no skipping.
bool is_open () const {return buf_.is_open ();}
+ // Read the textual stream. The stream is supposed not to contain the null
+ // character.
+ //
+ std::string
+ read_text ();
+
+ // Read the binary stream.
+ //
+ std::vector<char>
+ read_binary ();
+
private:
bool skip_ = false;
};