You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
438 B

import * as fs from "node:fs";
import * as path from "node:path";
export default function createDir() {
const dir = process.env.DATA_PATH;
const content = fs.readdirSync(dir, 'utf8');
console.log(content);
if (!fs.existsSync(path.join(dir, "import"))) {
fs.mkdirSync(path.join(dir, 'import'));
} else if (!fs.existsSync(path.join(dir, 'musics'))) {
fs.mkdirSync(path.join(dir, 'musics'));
}
}