licornea_tools
touch.cc
Go to the documentation of this file.
1 #include "../lib/common.h"
2 #include "../lib/args.h"
3 #include <fstream>
4 
5 using namespace tlz;
6 
7 int main(int argc, const char* argv[]) {
8  get_args(argc, argv, "out.file [no_create]");
9  std::string out_filename = out_filename_arg();
10  bool no_create = bool_opt_arg("no_create");
11 
12  if(! no_create) {
13  std::ofstream str(out_filename);
14  str.close();
15  }
16 }
17 
int main(int argc, const char *argv[])
Definition: touch.cc:7
std::string out_filename_arg()
Definition: args.cc:104
bool bool_opt_arg(const std::string &expected, bool def=false)
Definition: args.h:62
void get_args(int argc, const char *argv[], const std::string &usage)
Definition: args.cc:49