Hugging Face Deployer
Deploy bot to Hugging Face Spaces
03b405b
Raw History Blame Contribute Delete
855 Bytes
const path = require("node:path");
const fs = require("node:fs");
const ROOT = path.resolve(__dirname, "..", "..");
const paths = {
root: ROOT,
data: path.join(ROOT, "data"),
queue: path.join(ROOT, "data", "queue"),
cache: path.join(ROOT, "data", "cache"),
db: path.join(ROOT, "data", "db"),
temp: path.join(ROOT, "data", "temp"),
downloads: path.join(ROOT, "data", "temp", "downloads"),
output: path.join(ROOT, "data", "output"),
encrypted: path.join(ROOT, "data", "encrypted"),
recovery: path.join(ROOT, "data", "recovery"),
logs: path.join(ROOT, "logs"),
presets: path.join(ROOT, "presets"),
dashboardPublic: path.join(ROOT, "src", "dashboard", "public")
};
function ensurePaths() {
for (const value of Object.values(paths)) {
fs.mkdirSync(value, { recursive: true });
}
}
module.exports = { paths, ensurePaths };