match.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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_ALLWILD, // Paths and names are compared using wildcards.
  14. // Unlike MATCH_SUBPATH, paths do not match subdirs
  15. // unless a wildcard tells so.
  16. MATCH_EXACTPATH, // Paths must match exactly.
  17. // Names are compared using wildcards.
  18. MATCH_SUBPATH, // Names must be the same, but path in mask is allowed
  19. // to be only a part of name path. In other words,
  20. // we match all files matching the file mask
  21. // in current folder and subfolders.
  22. MATCH_WILDSUBPATH // Works as MATCH_SUBPATH if file mask contains
  23. // wildcards and as MATCH_EXACTPATH otherwise.
  24. };
  25. #define MATCH_MODEMASK 0x0000ffff
  26. #define MATCH_FORCECASESENSITIVE 0x80000000
  27. bool CmpName(const wchar *Wildcard,const wchar *Name,int CmpMode);
  28. #endif