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   wchar Name[NM];
11   uint64 Size;
12   uint FileAttr;
13   bool IsDir;
14   bool IsLink;
15   RarTime mtime;
16   RarTime ctime;
17   RarTime atime;
18 #ifdef _WIN_ALL
19   FILETIME ftCreationTime;
20   FILETIME ftLastAccessTime;
21   FILETIME ftLastWriteTime;
22 #endif
23   uint Flags;
24   bool Error;
25 };
26 
27 class FindFile
28 {
29   private:
30 #ifdef _WIN_ALL
31     static HANDLE Win32Find(HANDLE hFind,const wchar *Mask,FindData *fd);
32 #endif
33 
34     wchar FindMask[NM];
35     bool FirstCall;
36 #ifdef _WIN_ALL
37     HANDLE hFind;
38 #else
39     DIR *dirp;
40 #endif
41   public:
42     FindFile();
43     ~FindFile();
44     void SetMask(const wchar *Mask);
45     bool Next(FindData *fd,bool GetSymLink=false);
46     static bool FastFind(const wchar *FindMask,FindData *fd,bool GetSymLink=false);
47 };
48 
49 #endif
50