UNPKG

jsdoctoveps

Version:

js -> markdown-> vitepress

16 lines (13 loc) 569 B
const fsExtra = require("fs-extra"); const path = require("path"); let pathParameters = "../../"; // 确定路径的返回层级 async function acquireDir() { let dirList = await fsExtra.readdir(path.join(__dirname, "crutchFile")); // 获取目录列表 dirList.forEach((item) => { // 对文件列表进行复制 fsExtra.copy(path.join(__dirname, 'crutchFile', item), path.join(__dirname, pathParameters, item)).catch((err) => { console.log(err) }) }) console.log('File copied successfully'); } acquireDir()