1 #ifndef _RAR_FINDDATA_
2 #define _RAR_FINDDATA_
3 
4 enum FINDDATA_FLAGS {
5   FDDF_SECONDDIR=1  // Second encounter of same directory in SCAN_GETDIRSTWICE ScanTree mode
6 };
7 
8 struct FindData
9 {
10   char Name[NM];
11   wchar NameW[NM];
12   int64 Size;
13   uint FileAttr;
14   uint FileTime;
15   bool IsDir;
16   RarTime mtime;
17   RarTime ctime;
18   RarTime atime;
19 #ifdef _WIN_32
20   char ShortName[NM];
21   FILETIME ftCreationTime;
22   FILETIME ftLastAccessTime;
23   FILETIME ftLastWriteTime;
24 #endif
25   uint Flags;
26   bool Error;
27 };
28 
29 class FindFile
30 {
31   private:
32 #ifdef _WIN_32
33     static HANDLE Win32Find(HANDLE hFind,const char *Mask,const wchar *MaskW,struct FindData *fd);
34 #endif
35 
36     char FindMask[NM];
37     wchar FindMaskW[NM];
38     bool FirstCall;
39 #ifdef _WIN_32
40     HANDLE hFind;
41 #else
42     DIR *dirp;
43 #endif
44   public:
45     FindFile();
46     ~FindFile();
47     void SetMask(const char *FindMask);
48     void SetMaskW(const wchar *FindMaskW);
49     bool Next(struct FindData *fd,bool GetSymLink=false);
50     static bool FastFind(const char *FindMask,const wchar *FindMaskW,struct FindData *fd,bool GetSymLink=false);
51 };
52 
53 #endif
54