Loader.cpp
Go to the documentation of this file.
2 #include <istream>
3 #include <fstream>
4 #include <iostream>
5 #include <set>
6 
7 #define MYOUT std::cout
8 #define MYERR std::cerr
9 
10  bool Loader::uniqueFilename(const std::string &filePathName,
11  const std::string &fileExtension,
12  std::string &uniqueFullFileName)
13  {
14  int filen = 0;
15  bool fexists = true;
16  do{ //skip existing sequence files
17  uniqueFullFileName = filePathName + std::to_string(filen) + fileExtension;
18  std::ifstream iff(uniqueFullFileName);
19  if (!iff.good()){
20  fexists = false;
21  break;
22  }
23  ++filen;
24  } while (filen < 100000);
25 
26  return !fexists;
27  }
static bool uniqueFilename(const std::string &filePathName, const std::string &fileExtension, std::string &uniqueFullFileName)
Definition: Loader.cpp:10


choreo_task_sequence_planner
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:03:14