Optional method returning a metadata dict for the specified path (a str). Possible keys: - 'mtime' (mandatory) is the numeric timestamp of last source code modification; - 'size' (optional) is the size in bytes of the source code. Implementing this
(self, path)
| 758 | raise OSError |
| 759 | |
| 760 | def path_stats(self, path): |
| 761 | """Optional method returning a metadata dict for the specified |
| 762 | path (a str). |
| 763 | |
| 764 | Possible keys: |
| 765 | - 'mtime' (mandatory) is the numeric timestamp of last source |
| 766 | code modification; |
| 767 | - 'size' (optional) is the size in bytes of the source code. |
| 768 | |
| 769 | Implementing this method allows the loader to read bytecode files. |
| 770 | Raises OSError when the path cannot be handled. |
| 771 | """ |
| 772 | return {'mtime': self.path_mtime(path)} |
| 773 | |
| 774 | def _cache_bytecode(self, source_path, cache_path, data): |
| 775 | """Optional method which writes data (bytes) to a file path (a str). |