Returns direct subpaths for this object, i.e. either the named subfolder or all subfolders matching the pattern
(self, basepath)
| 78 | self.add_child(regex) |
| 79 | |
| 80 | def get_subpaths(self, basepath): |
| 81 | """Returns direct subpaths for this object, i.e. either the named subfolder or all |
| 82 | subfolders matching the pattern""" |
| 83 | if isinstance(self.pattern, Pattern): |
| 84 | return (os.path.join(basepath, p) for p in os.listdir(basepath) |
| 85 | if self.pattern.match(p) and os.path.isdir(os.path.join(basepath, p))) |
| 86 | path = os.path.join(basepath, self.pattern) |
| 87 | return [path] if os.path.isdir(path) else [] |
| 88 | |
| 89 | def get_localizations(self, basepath): |
| 90 | """Returns all localization items for this object and all descendant objects""" |
no test coverage detected