32class EXPCL_DTOOL_DTOOLUTIL GlobPattern {
34 INLINE GlobPattern(
const std::string &pattern = std::string());
35 INLINE GlobPattern(
const GlobPattern ©);
36 INLINE
void operator = (
const GlobPattern ©);
38 INLINE
bool operator == (
const GlobPattern &other)
const;
39 INLINE
bool operator != (
const GlobPattern &other)
const;
40 INLINE
bool operator < (
const GlobPattern &other)
const;
42 INLINE
void set_pattern(
const std::string &pattern);
54 INLINE
bool matches(
const std::string &candidate)
const;
57 INLINE
void output(std::ostream &out)
const;
67 bool matches_substr(std::string::const_iterator pi,
68 std::string::const_iterator pend,
69 std::string::const_iterator ci,
70 std::string::const_iterator cend)
const;
72 bool matches_set(std::string::const_iterator &pi,
73 std::string::const_iterator pend,
76 int r_match_files(
const Filename &prefix,
const std::string &suffix,
77 vector_string &results,
const Filename &cwd);
78 bool r_matches_file(
const std::string &suffix,
const Filename &candidate)
const;
82 std::string _nomatch_chars;
85INLINE std::ostream &operator << (std::ostream &out,
const GlobPattern &glob) {
The name of a file, such as a texture file or an Egg file.
This class can be used to test for string matches against standard Unix- shell filename globbing conv...
get_case_sensitive
Returns whether the match is case sensitive (true) or case insensitive (false).
set_pattern
Changes the pattern string that the GlobPattern object matches.
bool has_glob_characters() const
Returns true if the pattern includes any special globbing characters, or false if it is just a litera...
std::string get_const_prefix() const
Returns the initial part of the pattern before the first glob character.
get_pattern
Returns the pattern string that the GlobPattern object matches.
bool matches(const std::string &candidate) const
Returns true if the candidate string matches the pattern, false otherwise.
set_nomatch_chars
Specifies a set of characters that are not matched by * or ?
get_nomatch_chars
Returns the set of characters that are not matched by * or ?
bool matches_file(Filename candidate) const
Treats the GlobPattern as a filename pattern, and returns true if the given filename matches the patt...
set_case_sensitive
Sets whether the match is case sensitive (true) or case insensitive (false).
int match_files(vector_string &results, const Filename &cwd=Filename()) const
Treats the GlobPattern as a filename pattern, and returns a list of any actual files that match the p...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.