class documentation
A Callable[[Path], Iterator[Path]] which maps paths provided by another iterator to a new prefix, think ["src/a.py", "src/b.py"] mapped to ["dest/a.py", "dest/b.py"].
| Method | __call__ |
Maps the paths defined in the constructor to have a the new prefix path newRoot by replacing the oldRoot defined in the constructor. |
| Method | __init__ |
Creates the mapper by its input. |
| Instance Variable | _it |
Undocumented |
| Instance Variable | _old |
Undocumented |
Maps the paths defined in the constructor to have a the new prefix path newRoot by replacing the oldRoot defined in the constructor.
| Parameters | |
newPath | new path prefix of the paths defined in the constructor |
| Returns | |
Iterator[ | an iterator over the mapped paths, restartable |
Creates the mapper by its input.
The second parameter, itGen is not just an iterator but a function to provide one so that our result can be iterated over more than once.
| Parameters | |
oldPath | a path prefix of all paths provided by itGen |
itCallable[ | given oldRoot, must return an Iterator[Path] which may on only have paths prefixed with oldRoot, the canonical example being lambda p: p.glob(...) |