@@ -575,6 +575,21 @@ Pure paths provide the following methods and properties:
575575 >>> PurePath('/a/b/c.py').full_match('**/*.py')
576576 True
577577
578+ A pattern ending with "``/** ``" matches any path that begins with the
579+ pattern's prefix followed by a separator. For example "``/a/** ``" matches
580+ "``/a/b ``" and "``/a/b/c ``", but not "``/a ``", because "``/a ``" does not
581+ begin with "``/a/ ``". The recursive wildcard "``** ``" can match zero
582+ segments, but the separator before it must still be present in the path,
583+ and :class: `PurePath ` objects do not preserve trailing slashes (so
584+ "``/a/ ``" is normalized to "``/a ``")::
585+
586+ >>> PurePath('/a/b').full_match('/a/**')
587+ True
588+ >>> PurePath('/a').full_match('/a/**')
589+ False
590+ >>> PurePath('/a/').full_match('/a/**')
591+ False
592+
578593 .. seealso ::
579594 :ref: `pathlib-pattern-language ` documentation.
580595
@@ -1795,7 +1810,10 @@ The following wildcards are supported in patterns for
17951810:meth: `~PurePath.full_match `, :meth: `~Path.glob ` and :meth: `~Path.rglob `:
17961811
17971812``** `` (entire segment)
1798- Matches any number of file or directory segments, including zero.
1813+ Matches any number of file or directory segments, including zero. Note that
1814+ in :meth: `~PurePath.full_match `, a pattern ending with "``/** ``" requires the
1815+ separator before "``** ``" to be present in the path; see that method for an
1816+ example.
17991817``* `` (entire segment)
18001818 Matches one file or directory segment.
18011819``* `` (part of a segment)
0 commit comments