MCPcopy Create free account
hub / github.com/Semporia/Scripts / deleteFile

Function deleteFile

jd_bean_sign.js:171–179  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

169 }
170}
171async 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}
180function TotalBean() {
181 return new Promise(async resolve => {
182 const options = {

Callers 1

execSignFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected