PathPattern#

class PathPattern[source]#

Bases: object

Path fragment, contains the relative path + filename pattern containing a {name} substring

path: Path#

Relative path, possibly containing “{}”

static parser()[source]#

Returns a configpile parser for a PathPattern

Return type:

Parser[PathPattern]

to_path(root, replacement)[source]#

Returns a full path from this fragment

Parameters:
  • root (Path) – Absolute root path

  • replacement (str) – String to put in place of {name} in the fragment

Return type:

Path

__init__(path)#