mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-01-19 01:21:01 +08:00
19 lines
406 B
Python
19 lines
406 B
Python
import os
|
|
import pathlib
|
|
|
|
from config import conf
|
|
|
|
|
|
class TmpDir(object):
|
|
"""A temporary directory that is deleted when the object is destroyed."""
|
|
|
|
tmpFilePath = pathlib.Path("./tmp/")
|
|
|
|
def __init__(self):
|
|
pathExists = os.path.exists(self.tmpFilePath)
|
|
if not pathExists:
|
|
os.makedirs(self.tmpFilePath)
|
|
|
|
def path(self):
|
|
return str(self.tmpFilePath) + "/"
|