Merge pull request #4324 from FernetMenta/wasapi
[vuplus_xbmc] / lib / UnrarXLib / find.hpp
1 #ifndef _RAR_FINDDATA_
2 #define _RAR_FINDDATA_
3
4 struct FindData
5 {
6   char Name[NM];
7   wchar NameW[NM];
8   Int64 Size;
9   uint FileAttr;
10   uint FileTime;
11   bool IsDir;
12   RarTime mtime;
13   RarTime ctime;
14   RarTime atime;
15 #ifdef _WIN_32
16   char ShortName[NM];
17   FILETIME ftCreationTime; 
18   FILETIME ftLastAccessTime; 
19   FILETIME ftLastWriteTime; 
20 #endif
21   bool Error;
22 };
23
24 class FindFile
25 {
26   private:
27 #ifdef _WIN_32
28     static HANDLE Win32Find(HANDLE hFind,const char *Mask,const wchar *MaskW,struct FindData *fd);
29 #endif
30
31     char FindMask[NM];
32     wchar FindMaskW[NM];
33     int FirstCall;
34 #ifdef _WIN_32
35     HANDLE hFind;
36 #else
37     DIR *dirp;
38 #endif
39   public:
40     FindFile();
41     ~FindFile();
42     void SetMask(const char *FindMask);
43     void SetMaskW(const wchar *FindMaskW);
44     bool Next(struct FindData *fd,bool GetSymLink=false);
45     static bool FastFind(const char *FindMask,const wchar *FindMaskW,struct FindData *fd,bool GetSymLink=false);
46 };
47
48 #endif