"use strict";
const fs = require('fs')
fs.rename('logs/hello.log','logs/hola.log',(error) => {
if (error) {
console.log(error);
} else {
console.log('ok');
}
});
"use strict";
const fs = require('fs')
fs.rename('logs/hello.log','logs/hola.log',(error) => {
if (error) {
console.log(error);
} else {
console.log('ok');
}
});
本文标题:Node.js重命名文件
本文链接:https://www.haomeiwen.com/subject/ezibpftx.html
网友评论