14 std::ifstream file(filename.c_str());
15 const bool exists = bool(file);
21 const std::string& suffix,
26 for (
int i = endIndex; i >= startIndex; --i)
29 ss << prefix << i << suffix;
35 return std::min(startIndex, endIndex) - 1;
39 const std::string& suffix,
43 const int possibleIndex =
45 if (possibleIndex == std::min(startIndex, endIndex) - 1)
50 ss << prefix << possibleIndex << suffix;
Definition: wmiointerface.h:10
std::string scanForFileWithPrefixSuffix(const std::string &prefix, const std::string &suffix, const int startIndex, const int endIndex)
Definition: wmiointerface.h:38
bool fileExists(const std::string &filename)
Definition: wmiointerface.h:12
int scanForFileIndexWithPrefixSuffix(const std::string &prefix, const std::string &suffix, const int startIndex, const int endIndex)
Definition: wmiointerface.h:20