1 Star 1 Fork 3

好望角/sarsgamexlsxparser

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
move.js 826 Bytes
一键复制 编辑 原始数据 按行查看 历史
DESKTOP-6BQ2U9G\cgw08 提交于 2023-07-13 09:40 . add move.js
var FS = require('fs');
var folder = process.argv[2];
function parseFile(fileName, exportPath) {
console.log("parseFile fileName ", fileName)
let list = fileName.split('/');
let data = FS.readFileSync(fileName,'utf-8');
FS.writeFileSync(fileName,data,'utf-8');
}
function readDir(dir, exportPath) {
// console.log(' readDir ===================')
var stat = fs.statSync(dir);
if (!stat.isDirectory()) {
return;
}
var subpaths = fs.readdirSync(dir),
subpath;
for (var i = 0; i < subpaths.length; ++i) {
if (subpaths[i][0] === '.') {
continue;
}
subpath = path.join(dir, subpaths[i]);
// console.log(' readDir subpath ', subpath)
stat = fs.statSync(subpath);
if (stat.isDirectory()) {
readDir(subpath, exportPath);
} else if (stat.isFile()) {
parseFile(subpath, exportPath);
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiangnanwu/sarsgamexlsxparser.git
git@gitee.com:xiangnanwu/sarsgamexlsxparser.git
xiangnanwu
sarsgamexlsxparser
sarsgamexlsxparser
master

搜索帮助