gallery.accords-library.com/server/szurubooru/util/files.py

9 lines
259 B
Python
Raw Normal View History

2016-04-09 19:41:10 +00:00
import os
from szurubooru import config
def save(path, content):
full_path = os.path.join(config.config['data_dir'], path)
os.makedirs(os.path.dirname(full_path), exist_ok=True)
with open(full_path, 'wb') as handle:
handle.write(content)