(path)
| 169 | } |
| 170 | } |
| 171 | async function deleteFile(path) { |
| 172 | // 查看文件result.txt是否存在,如果存在,先删除 |
| 173 | const fileExists = await fs.existsSync(path); |
| 174 | // console.log('fileExists', fileExists); |
| 175 | if (fileExists) { |
| 176 | const unlinkRes = await fs.unlinkSync(path); |
| 177 | // console.log('unlinkRes', unlinkRes) |
| 178 | } |
| 179 | } |
| 180 | function TotalBean() { |
| 181 | return new Promise(async resolve => { |
| 182 | const options = { |