Merged internal 'matchPath' method of class Archive into global matchString function (via an optional 'path mode' in the latter). Also changed Archive::listMatchingMembers to use path mode when matching, just like FSDirectory::listMatchingMembers
svn-id: r38277
This commit is contained in:
parent
544bda60fa
commit
17014c4f47
4 changed files with 19 additions and 62 deletions
|
@ -166,11 +166,12 @@ public:
|
|||
*
|
||||
* @param str Text to be matched against the given pattern.
|
||||
* @param pat Glob pattern.
|
||||
* @param pathMode Whether to use path mode, i.e., whether slashes must be matched explicitly.
|
||||
*
|
||||
* @return true if str matches the pattern, false otherwise.
|
||||
*/
|
||||
bool matchString(const char *pat) const;
|
||||
bool matchString(const String &pat) const;
|
||||
bool matchString(const char *pat, bool pathMode = false) const;
|
||||
bool matchString(const String &pat, bool pathMode = false) const;
|
||||
|
||||
|
||||
inline const char *c_str() const { return _str; }
|
||||
|
@ -306,10 +307,11 @@ Common::String normalizePath(const Common::String &path, const char sep);
|
|||
*
|
||||
* @param str Text to be matched against the given pattern.
|
||||
* @param pat Glob pattern.
|
||||
* @param pathMode Whether to use path mode, i.e., whether slashes must be matched explicitly.
|
||||
*
|
||||
* @return true if str matches the pattern, false otherwise.
|
||||
*/
|
||||
bool matchString(const char *str, const char *pat);
|
||||
bool matchString(const char *str, const char *pat, bool pathMode = false);
|
||||
|
||||
|
||||
class StringList : public Array<String> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue