1#ifndef __JSYSTEM_JGLOB__
2#define __JSYSTEM_JGLOB__
39 JGlob(
const std::string& pattern)
83 for (
const std::string& pattern :
buffer) {
99 using namespace std::filesystem;
103 if (is_symlink(ps)) {
104 ps = read_symlink(ps);
120 const int value = glob(pattern.c_str(), GLOB_TILDE | GLOB_BRACE, NULL, &
buffer);
124 for(
size_t i = 0; i <
buffer.gl_pathc; ++i) {
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for operating system calls.
static JGlob getFilenames
Function object to get list of files for given pattern.
Auxiliary class to list files.
const JGlob & operator()(const std::string &pattern)
Get list of files.
JGlob(const std::string &pattern)
Constructor.
const JGlob & operator()(const std::vector< std::string > &buffer)
Get list of files.
void evaluate(const std::string &pattern)
Process pattern.
JGlob()
Default constructor.
JGlob(const std::vector< std::string > &buffer)
Constructor.
void push_back(const std::string &file_name)
Push back file.