File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -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
You can’t perform that action at this time.
0 commit comments