8 static char pbuf[8192];
9 static const std::string lsCom(
"/bin/ls ");
11 std::vector<std::string> newfnames;
13 if ( ( fname.find(
'*', 0) != std::string::npos ) ||
14 ( fname.find(
'?', 0) != std::string::npos ) )
16 FILE* ftmp = popen((lsCom+fname).c_str(),
"r");
18 std::stringstream fnstream;
19 while ( fgets(pbuf, 8192, ftmp) !=
NULL ) {
24 while ( ! (fnstream>>tfn).eof() ) {
25 newfnames.push_back(tfn);
29 newfnames.push_back(fname);
37 static char pbuf[8192];
38 static const std::string lsCom(
"/bin/ls ");
40 std::vector<std::string> newfnames;
42 std::stringstream fnstream;
43 std::vector<std::string>::const_iterator it = fnames.begin();
45 while ( it != fnames.end() ) {
46 if ( ( it->find(
'*', 0) != std::string::npos ) ||
47 ( it->find(
'?', 0) != std::string::npos ) ) {
49 std::string com = lsCom + (*it);
50 FILE* ftmp = popen(com.c_str(),
"r");
53 while ( fgets(pbuf, 8192, ftmp) !=
NULL ) {
57 while ( ! (fnstream>>fname).eof() ) {
58 newfnames.push_back(fname);
62 newfnames.push_back(*it);