123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef _READDIR_H
- #define _READDIR_H
- #include <bfc/common.h>
- #include <bfc/string/StringW.h>
- class ReadDir
- {
- public:
- ReadDir(const wchar_t *path, const wchar_t *match=NULL, bool skipdots=true);
- ~ReadDir();
- int next();
- const wchar_t *getFilename();
- int isDir();
- int isReadonly();
- int isDotDir();
- int isDotDotDir();
- const wchar_t *getPath() { return path; }
- private:
- StringW path, match;
- int skipdots, first;
- #ifdef WIN32
- HANDLE files;
- WIN32_FIND_DATAW data;
-
- #endif
- #ifdef LINUX
- DIR *d;
- struct dirent *de;
- struct stat st;
- #endif
- };
- #endif
|