Functions
globbing.h File Reference
#include <glob.h>
#include <vector>
#include <string>

Go to the source code of this file.

Functions

std::vector< std::stringglobbing (const std::string &pat)
 

Function Documentation

std::vector<std::string> globbing ( const std::string pat)
inline

Definition at line 16 of file globbing.h.

16  {
17 
18  glob_t glob_result;
19  std::vector<std::string> ret;
20 
21  glob(pat.c_str(),GLOB_TILDE,NULL,&glob_result);
22 
23  for (unsigned int i=0; i<glob_result.gl_pathc; ++i){
24  ret.push_back(std::string(glob_result.gl_pathv[i]));
25  }
26 
27  globfree(&glob_result);
28 
29  return ret;
30 }
std::string string
Definition: nybbler.cc:12