Yields the sub-paths.
(self)
| 294 | return f'https://github.com/{self.repo}/blob/{self.branch}/{self.subpath}' |
| 295 | |
| 296 | def iterdir(self) -> Iterator['GithubPath']: |
| 297 | """Yields the sub-paths.""" |
| 298 | if not self.is_dir(): |
| 299 | raise NotADirectoryError(f'{self.subpath} is not a directory.') |
| 300 | for filename in self.github_tree.files_per_folder[self.subpath]: |
| 301 | yield self / filename.name |
| 302 | |
| 303 | def is_dir(self) -> bool: |
| 304 | """Returns True if the path is a directory or submodule.""" |