Go to the documentation of this file.
102 if (!
in.good())
return *
this;
103 while (isspace(c = (
char)
in.peek()))
in.get();
108 if (!
in.fail())
return *
this;
129 mutable std::istream*
in;
void replace_all(String &s, const String &what, const String &with)
Replace all occurances of ‘what’ in ‘s’ with ‘with’.
void cleanup_output_file(std::ofstream &file, const String &name)
void open_output_file(std::ofstream &file, const String &name)
Verbosity verbosity(Workspace &ws) noexcept
const double_imanip & operator>>(double &x) const
bool find_xml_file_existence(String &filename)
As find_xml_file but does not throw in the main body.
void make_filename_unique(String &filename, const String &extension="")
Make filename unique.
void list_directory(ArrayOfString &files, String dirname)
Return list of files in directory.
double_istream & operator>>(double &x)
void filename_bin(String &filename, const String &varname)
Declarations having to do with the four output streams.
std::istream & operator>>(const double_imanip &) const
Input manipulator class for doubles to enable nan and inf parsing.
void read_text_from_file(ArrayOfString &text, const String &name)
Reads an ASCII file and appends the contents to the String vector text.
void open_input_file(std::ifstream &file, const String &name)
double_istream(std::istream &i)
String expand_path(const String &path)
void find_xml_file(String &filename, const Verbosity &verbosity)
Find an xml file.
int check_newline(const String &s)
Checks if there is exactly one newline character at the end of the string.
void get_dirname(String &dirname, const String &path)
Return the parent directory of a path.
const double_imanip & operator>>(std::istream &in, const double_imanip &dm)
Input stream class for doubles that correctly handles nan and inf.
void read_text_from_stream(ArrayOfString &text, std::istream &is)
Read an ASCII stream and append the contents to the String array text.
double_istream & parse_on_fail(double &x, bool neg)
Vector x(Workspace &ws) noexcept
void filename_ascii(String &filename, const String &varname)
Gives the default file name for the ASCII formats.
String add_basedir(const String &path)
bool find_file(ArrayOfString &matches, const String &filename, const ArrayOfString &paths, const ArrayOfString &extensions={""})
Searches through paths for a file with a matching name.
bool file_exists(const String &filename)
Checks if the given file exists.
This file contains the definition of String, the ARTS string class.