6 #ifndef FILEIO_UNION_FSTREAM_HPP 7 #define FILEIO_UNION_FSTREAM_HPP 22 enum stream_type {HDFS, STD, CACHE};
31 std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out,
32 std::string proxy=
"");
40 std::shared_ptr<std::istream> get_istream();
42 std::shared_ptr<std::ostream> get_ostream();
63 size_t m_file_size = (size_t)(-1);
65 std::shared_ptr<std::istream> input_stream;
66 std::shared_ptr<std::ostream> output_stream;
69 std::shared_ptr<std::istream> original_input_stream_handle;
std::string get_name() const
stream_type get_type() const
Returns the current stream type. Whether it is a HDFS, STD, or cache stream.
union_fstream(std::string url, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out, std::string proxy="")
~union_fstream()
Destructor.