You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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