Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

18 lines
382B

  1. import os
  2. import pathlib
  3. class TmpDir(object):
  4. """A temporary directory that is deleted when the object is destroyed."""
  5. tmpFilePath = pathlib.Path("./tmp/")
  6. def __init__(self):
  7. pathExists = os.path.exists(self.tmpFilePath)
  8. if not pathExists:
  9. os.makedirs(self.tmpFilePath)
  10. def path(self):
  11. return str(self.tmpFilePath) + "/"