61void replace_all(
String& s,
const std::string_view what,
const std::string_view with);
65[[nodiscard]]
bool file_exists(
const std::string_view filename);
68 const std::string_view filename,
Fast double input stream with support for parsing nan and inf.
ArrayOfString list_directory(const std::string_view dirname)
Return list of files in directory.
ArrayOfString read_text_from_file(const std::string_view name)
Reads an ASCII file and appends the contents to the String vector text.
void open_output_file(std::ofstream &file, const std::string_view name)
String make_filename_unique(const std::string_view filename, const String &extension="")
Make filename unique.
String add_basedir(const std::string_view path)
void find_xml_file(String &filename, const Verbosity &verbosity)
Find an xml file.
ArrayOfString read_text_from_stream(std::istream &is)
bool find_xml_file_existence(String &filename)
As find_xml_file but does not throw in the main body.
String expand_path(String path)
void replace_all(String &s, const std::string_view what, const std::string_view with)
Replace all occurances of ‘what’ in ‘s’ with ‘with’.
void filename_ascii(String &filename, const String &varname)
Gives the default file name for the ASCII formats.
void cleanup_output_file(std::ofstream &file, const std::string_view name)
void filename_bin(String &filename, const std::string_view varname)
bool find_file(ArrayOfString &matches, const std::string_view filename, const ArrayOfString &paths, const ArrayOfString &extensions={""})
Searches through paths for a file with a matching name.
void open_input_file(std::ifstream &file, const std::string_view name)
int check_newline(const std::string_view s)
Checks if there is exactly one newline character at the end of the string.
bool file_exists(const std::string_view filename)
Checks if the given file exists.
String get_dirname(const std::string_view path)
Return the parent directory of a path.
Declarations having to do with the four output streams.
This file contains the definition of String, the ARTS string class.