27 #ifndef LBANN_UTILS_GLOB_HPP 28 #define LBANN_UTILS_GLOB_HPP 42 inline std::vector<std::string>
glob(
const std::string& pattern)
45 int r =
glob(pattern.c_str(), 0,
nullptr, &pglob);
48 if (r == GLOB_NOMATCH) {
55 std::vector<std::string> results(pglob.gl_pathc);
56 for (
size_t i = 0; i < pglob.gl_pathc; ++i) {
57 results[i] = std::string(pglob.gl_pathv[i]);
65 #endif // LBANN_UTILS_GLOB_HPP std::vector< std::string > glob(const std::string &pattern)
exception lbann_exception