#include <xtd/xtd>
class program {
public:
static auto main() {
std::ofstream ofs(fi.append_text());
sw.write_line("Add as many lines as you like...");
sw.write_line("Add another line to the output...");
sw.flush();
sw.close();
std::ifstream ifs(fi.open_read());
console::write_line("This is the information in the first file:");
while (sr.peek() != -1)
console::write_line(sr.read_line());
console::write_line("{0}This is the information in the second file:", environment::new_line());
while (sr.peek() != -1)
console::write_line(sr.read_line());
}
};
xtd::io::file_info copy_to(const xtd::string &dest_file_name) const
Copies an existing file to a new file, disallowing the overwriting of an existing file.
std::ifstream open_read() const
Creates a read-only std::ifstream.
Implements a xtd::io::text_reader that reads characters from a byte stream.
Definition stream_reader.h:28
Implements a xtd::io::text_writer for writing characters to a stream.
Definition stream_writer.h:28