12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #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;
- virtual int match(string fext_, string file_);
-
- public:
- void test();
- int find(string path_, string fext_ = "");
-
- public:
- string get(int i = 0) { return _co.at(i); }
- int count() { return _co_dir.size() + _co_file.size(); }
-
- typeT co() { return _co; }
- typeT co_dir() { return _co_dir; }
- typeT co_file() { return _co_file; }
-
- public:
- int limit() { return _limit; }
- void limit(int limit_);
-
- public:
- int dirs() { return _dirs; }
- void dirs(int dirs) { _dirs = dirs; }
- int dir(string s);
-
- private:
- int _limit;
- int _dirs;
- typeT _co_file;
- typeT _co_dir;
- typeT _co;
-
- public:
- ffsco();
- virtual ~ffsco();
-
- private:
- inline int checkcount() {return 0;}
- inline string _uppercase_(string s);
- };
- };
- #endif
|