我想创建一个while循环,只要超时完成或满足条件,它就会中断
async checkFile (filePath) {
const readDir = fs.readdirSync(filePath,'utf-8')
while(true) {
if(readDir === filename) {
break;
}
}
}
我想创建一个while循环,只要超时完成或满足条件,它就会中断
async checkFile (filePath) {
const readDir = fs.readdirSync(filePath,'utf-8')
while(true) {
if(readDir === filename) {
break;
}
}
}