1#ifndef joedb_File_Parser_declared
2#define joedb_File_Parser_declared
24 const bool default_only;
25 const bool include_shared;
26 const bool include_server;
29 std::optional<ssh::Session> ssh_session;
30 std::optional<ssh::SFTP> sftp;
32 std::unique_ptr<Buffered_File> file;
38 bool default_only =
false,
39 bool include_shared =
true,
40 bool include_server =
false
42 default_open_mode(default_open_mode),
43 default_only(default_only),
44 include_shared(include_shared),
45 include_server(include_server)
Class for conveniently parsing command-line arguments.
Create an instance of a Buffered_File by parsing command-line arguments.
Buffered_File * parse(std::ostream &out, Arguments &arguments)
Buffered_File * get_file() const
void print_help(std::ostream &out) const
File_Parser(Open_Mode default_open_mode=Open_Mode::write_existing_or_create_new, bool default_only=false, bool include_shared=true, bool include_server=false)
@ write_existing_or_create_new
either write_existing or create_new depending on whether the file exists. Racy in Posix,...