📜  复制文件 javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:22.106000             🧑  作者: Mango

代码示例1
//copyfile.js
const fs = require('fs');

// destination will be created or overwritten by default.
fs.copyFile('C:\folderA\myfile.txt', 'C:\folderB\myfile.txt', (err) => {
  if (err) throw err;
  console.log('File was copied to destination');
});