Delete old files in "tmp".
(self)
| 528 | os.rmdir(path) |
| 529 | |
| 530 | def clean(self): |
| 531 | """Delete old files in "tmp".""" |
| 532 | now = time.time() |
| 533 | for entry in os.listdir(os.path.join(self._path, 'tmp')): |
| 534 | path = os.path.join(self._path, 'tmp', entry) |
| 535 | if now - os.path.getatime(path) > 129600: # 60 * 60 * 36 |
| 536 | os.remove(path) |
| 537 | |
| 538 | _count = 1 # This is used to generate unique file names. |
| 539 |