Return True if this path matches the given glob-style pattern. The pattern is matched against the entire path.
(self, pattern, *, case_sensitive=None)
| 544 | return prefix + quote_from_bytes(os.fsencode(path)) |
| 545 | |
| 546 | def full_match(self, pattern, *, case_sensitive=None): |
| 547 | """ |
| 548 | Return True if this path matches the given glob-style pattern. The |
| 549 | pattern is matched against the entire path. |
| 550 | """ |
| 551 | if not hasattr(pattern, 'with_segments'): |
| 552 | pattern = self.with_segments(pattern) |
| 553 | if case_sensitive is None: |
| 554 | case_sensitive = self.parser is posixpath |
| 555 | |
| 556 | # The string representation of an empty path is a single dot ('.'). Empty |
| 557 | # paths shouldn't match wildcards, so we change it to the empty string. |
| 558 | path = str(self) if self.parts else '' |
| 559 | pattern = str(pattern) if pattern.parts else '' |
| 560 | globber = _StringGlobber(self.parser.sep, case_sensitive, recursive=True) |
| 561 | return globber.compile(pattern)(path) is not None |
| 562 | |
| 563 | def match(self, path_pattern, *, case_sensitive=None): |
| 564 | """ |