Return the parts of the paths following the prefix. :param iter: Iterator over path names. :param prefix: Expected prefix of the path names.
(iter: Iterable[os.DirEntry[str]], prefix: str)
| 178 | |
| 179 | |
| 180 | def extract_suffixes(iter: Iterable[os.DirEntry[str]], prefix: str) -> Iterator[str]: |
| 181 | """Return the parts of the paths following the prefix. |
| 182 | |
| 183 | :param iter: Iterator over path names. |
| 184 | :param prefix: Expected prefix of the path names. |
| 185 | """ |
| 186 | p_len = len(prefix) |
| 187 | for entry in iter: |
| 188 | yield entry.name[p_len:] |
| 189 | |
| 190 | |
| 191 | def find_suffixes(root: Path, prefix: str) -> Iterator[str]: |
no outgoing calls
no test coverage detected