Files
rss-server/handlers/pixiv/file.py
mol 5157f4f8d2
All checks were successful
continuous-integration/drone/push Build is passing
feat
2023-09-05 18:06:07 +08:00

13 lines
306 B
Python

import os
def save_file(name, data):
temp_path = os.path.join(os.path.dirname(__file__), 'temp')
with open(os.path.join(temp_path, name), 'wb') as code:
code.write(data)
def remove_file(path):
if len(path) > 0:
try:
os.remove(path)
except:
pass