Iterate over all existing files in all registered paths.
(self)
| 3091 | return os.path.exists(path) |
| 3092 | |
| 3093 | def __iter__(self): |
| 3094 | """ Iterate over all existing files in all registered paths. """ |
| 3095 | search = self.path[:] |
| 3096 | while search: |
| 3097 | path = search.pop() |
| 3098 | if not os.path.isdir(path): continue |
| 3099 | for name in os.listdir(path): |
| 3100 | full = os.path.join(path, name) |
| 3101 | if os.path.isdir(full): search.append(full) |
| 3102 | else: yield full |
| 3103 | |
| 3104 | def lookup(self, name): |
| 3105 | """ Search for a resource and return an absolute file path, or `None`. |