123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #ifndef __FFSCO__
- #define __FFSCO__
- #ifndef WIN32
- #error now only for WIN32(platform).
- #endif
- #include <string>
- #include <vector>
- #include <sstream>
- using namespace std;
- #pragma warning(disable:4786)
- namespace helper_coffs {
-
- const int max_limit = 0x100000;
- const int def_limit = 0x10000;
-
- const char c_pathSeparator = '\\';
- const string s_pathSeparator = "\\";
-
-
- class ffsco
- {
- public:
- typedef vector<string> typeT;
- public:
- ffsco();
- virtual ~ffsco();
- virtual int match(string fext_, string file_);
-
- void test();
- int find(string path_, string fext_ = "");
-
- string get(int i = 0) { return _co.at(i); }
- int count() { return _co.size(); }
- typeT& co() { return _co; }
- typeT& co_dir() { return _co_dir; }
- typeT& co_file() { return _co_file; }
-
- int limit() { return _limit; }
- void limit( int limit_);
-
- int dirs() { return _dirs; }
- void dirs( int dirs) { _dirs = dirs; }
- int dir( string& s);
- void Clear();
- private:
- inline string _uppercase_( string& s);
- void findex( string path_, string fext_);
- private:
- int _limit;
- int _dirs;
- typeT _co_file;
- typeT _co_dir;
- typeT _co;
- };
- };
- #endif
|