1#ifndef joedb_File_Parser_declared
2#define joedb_File_Parser_declared
25 const bool default_only;
26 const bool include_shared;
27 const bool include_server;
30 std::optional<ssh::Session> ssh_session;
31 std::optional<ssh::SFTP> sftp;
33 std::unique_ptr<Abstract_File> file;
39 bool default_only =
false,
40 bool include_shared =
true,
41 bool include_server =
false
43 default_open_mode(default_open_mode),
44 default_only(default_only),
45 include_shared(include_shared),
46 include_server(include_server)
Class for conveniently parsing command-line arguments.
Create an instance of a Abstract_File by parsing command-line arguments.
Abstract_File * parse(joedb::Logger &log, Arguments &arguments)
Abstract_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,...