Panda3D
|
This class can be used to test for string matches against standard Unix-shell filename globbing conventions. It serves as a portable standin for the Posix fnmatch() call. More...
Public Member Functions | |
__init__ (const GlobPattern copy) | |
__init__ (str pattern) | |
bool | getCaseSensitive () |
Returns whether the match is case sensitive (true) or case insensitive (false). The default is case sensitive. More... | |
str | getConstPrefix () |
str | getNomatchChars () |
Returns the set of characters that are not matched by. More... | |
str | getPattern () |
Returns the pattern string that the GlobPattern object matches. More... | |
bool | hasGlobCharacters () |
bool | matches (str candidate) |
Returns true if the candidate string matches the pattern, false otherwise. More... | |
object | matchFiles (const Filename cwd) |
int | matchFiles (VectorString results, const Filename cwd) |
bool | operator!= (const GlobPattern other) |
bool | operator< (const GlobPattern other) |
GlobPattern | operator= (const GlobPattern copy) |
bool | operator== (const GlobPattern other) |
output (Ostream out) | |
setCaseSensitive (bool case_sensitive) | |
Sets whether the match is case sensitive (true) or case insensitive (false). The default is case sensitive. More... | |
setNomatchChars (str nomatch_chars) | |
Specifies a set of characters that are not matched by. More... | |
setPattern (str pattern) | |
Changes the pattern string that the GlobPattern object matches. More... | |
This class can be used to test for string matches against standard Unix-shell filename globbing conventions. It serves as a portable standin for the Posix fnmatch() call.
A GlobPattern is given a pattern string, which can contain operators like *, ?, and []. Then it can be tested against any number of candidate strings; for each candidate, it will indicate whether the string matches the pattern or not. It can be used, for example, to scan a directory for all files matching a particular pattern.
__init__ | ( | const GlobPattern | copy | ) |
__init__ | ( | str | pattern | ) |
bool getCaseSensitive | ( | ) |
Returns whether the match is case sensitive (true) or case insensitive (false). The default is case sensitive.
str getConstPrefix | ( | ) |
str getNomatchChars | ( | ) |
Returns the set of characters that are not matched by.
str getPattern | ( | ) |
Returns the pattern string that the GlobPattern object matches.
bool hasGlobCharacters | ( | ) |
bool matches | ( | str | candidate | ) |
Returns true if the candidate string matches the pattern, false otherwise.
object matchFiles | ( | const Filename | cwd | ) |
int matchFiles | ( | VectorString | results, |
const Filename | cwd | ||
) |
bool operator!= | ( | const GlobPattern | other | ) |
bool operator< | ( | const GlobPattern | other | ) |
GlobPattern operator= | ( | const GlobPattern | copy | ) |
bool operator== | ( | const GlobPattern | other | ) |
output | ( | Ostream | out | ) |
setCaseSensitive | ( | bool | case_sensitive | ) |
Sets whether the match is case sensitive (true) or case insensitive (false). The default is case sensitive.
setNomatchChars | ( | str | nomatch_chars | ) |
Specifies a set of characters that are not matched by.
setPattern | ( | str | pattern | ) |
Changes the pattern string that the GlobPattern object matches.