(oldFilePath, newFilePath)
| 34 | } |
| 35 | |
| 36 | function renameFileSync(oldFilePath, newFilePath) { |
| 37 | fs.renameSync(oldFilePath, newFilePath, err => { |
| 38 | if (err) { |
| 39 | throw new Error(`文件重命名失败${oldFilePath} -> ${newFilePath}`) |
| 40 | } |
| 41 | }) |
| 42 | } |
| 43 | function copyFileSync(filePath, newFilePath, mode) { |
| 44 | fs.copyFileSync(filePath, newFilePath, mode, err => { |
| 45 | if (err) { |
no outgoing calls
no test coverage detected