Find all elements in root that begin with the prefix, case insensitive.
(root: Path, prefix: str)
| 153 | |
| 154 | |
| 155 | def find_prefixed(root: Path, prefix: str) -> Iterator[Path]: |
| 156 | """Find all elements in root that begin with the prefix, case insensitive.""" |
| 157 | l_prefix = prefix.lower() |
| 158 | for x in root.iterdir(): |
| 159 | if x.name.lower().startswith(l_prefix): |
| 160 | yield x |
| 161 | |
| 162 | |
| 163 | def extract_suffixes(iter: Iterable[PurePath], prefix: str) -> Iterator[str]: |
no outgoing calls
no test coverage detected