Delete old files in "tmp".
(self)
| 535 | os.rmdir(path) |
| 536 | |
| 537 | def clean(self): |
| 538 | """Delete old files in "tmp".""" |
| 539 | now = time.time() |
| 540 | for entry in os.listdir(os.path.join(self._path, 'tmp')): |
| 541 | path = os.path.join(self._path, 'tmp', entry) |
| 542 | if now - os.path.getatime(path) > 129600: # 60 * 60 * 36 |
| 543 | os.remove(path) |
| 544 | |
| 545 | _count = 1 # This is used to generate unique file names. |
| 546 |