3#include "RawFile/RawFileTools.h"
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);
72 std::string::size_type pathend = fname.rfind(
'/', fname.length());
73 std::string idxname = (pathend != std::string::npos ) ? fname.substr(pathend+1) : fname;
82 std::stringstream sstr;
88 while ( str.length() < 3 ) {
89 str = std::string(
"0") + str;