IMP Reference Guide
develop.298718d020,2025/02/21
The Integrative Modeling Platform
|
#include <IMP/file.h>
A TextInput can be implicitly constructed from a C++ stream, a Python filelike object or a path to a file. As a result, those can be passed directly to functions which take a TextInput as an argument.
Public Member Functions | |
TextInput (std::string file_name) | |
TextInput (std::istream &out, std::string name="C++ stream") | |
std::string | get_name () const |
operator bool_type () const | |
void | set_binary_open_mode (bool binary) |
Control whether to open the file in text or binary mode. More... | |
void | show (std::ostream &out=std::cout) const |
void IMP::TextInput::set_binary_open_mode | ( | bool | binary | ) |
Control whether to open the file in text or binary mode.
This only has an effect on files constructed from filename, and is an error if the file has already been opened. For streams or filelike objects, open the stream in binary mode first before passing it to TextInput.