match.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _RAR_MATCH_
  2. #define _RAR_MATCH_
  3. enum {
  4. MATCH_NAMES, // Paths are ignored.
  5. // Compares names only using wildcards.
  6. MATCH_SUBPATHONLY, // Paths must match either exactly or path in wildcard
  7. // must be present in the beginning of file path.
  8. // For example, "c:\path1\*" or "c:\path1" will match
  9. // "c:\path1\path2\file".
  10. // Names are not compared.
  11. MATCH_EXACT, // Paths must match exactly.
  12. // Names must match exactly.
  13. MATCH_EXACTPATH, // Paths must match exactly.
  14. // Names are compared using wildcards.
  15. MATCH_SUBPATH, // Names must be the same, but path in mask is allowed
  16. // to be only a part of name path. In other words,
  17. // we match all files matching the file mask
  18. // in current folder and subfolders.
  19. MATCH_WILDSUBPATH // Works as MATCH_SUBPATH if file mask contains
  20. // wildcards and as MATCH_EXACTPATH otherwise.
  21. };
  22. #define MATCH_MODEMASK 0x0000ffff
  23. #define MATCH_FORCECASESENSITIVE 0x80000000
  24. bool CmpName(const char *Wildcard,const char *Name,int CmpMode);
  25. bool CmpName(const wchar *Wildcard,const wchar *Name,int CmpMode);
  26. #endif