Files
IPTV-Restream/backend/services/restream/StorageService.js
2024-12-22 18:12:50 +01:00

17 lines
360 B
JavaScript

const fs = require('fs');
const STORAGE_PATH = process.env.STORAGE_PATH;
function createChannelStorage(channelId) {
fs.mkdirSync(STORAGE_PATH + channelId);
}
function deleteChannelStorage(channelId) {
fs.rmSync(STORAGE_PATH + channelId, { recursive: true, force: true });
}
module.exports = {
deleteChannelStorage,
createChannelStorage
};