1#ifndef joedb_File_Parser_declared
2#define joedb_File_Parser_declared
23 const bool default_only;
24 const bool include_shared;
25 const bool include_server;
28 std::optional<ssh::Session> ssh_session;
29 std::optional<ssh::SFTP> sftp;
31 std::unique_ptr<Buffered_File> file;
37 bool default_only =
false,
38 bool include_shared =
true,
39 bool include_server =
false
41 default_open_mode(default_open_mode),
42 default_only(default_only),
43 include_shared(include_shared),
44 include_server(include_server)
52 const char *
const * argv,
Create an instance of a Buffered_File by parsing command-line arguments.
Buffered_File * get_file() const
Buffered_File * parse(std::ostream &out, int argc, const char *const *argv, int &arg_index)
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,...