İfİ删除的文件请考虑以下代码。
可以让同一个人恢复已删除的文件吗?
如果是,如何防止此操作?
提前谢谢!
const clients = [{
"client_id": "AAA1",
"contracts": [{
"contract_id": "CON1-AAA1",
"revisions": [{
"date": "2018-07-30",
"status": "First Sign"
}]
}]
}, {
"client_id": "AAA2",
"contracts": [{
"contract_id": "CON1-AAA2",
"revisions": [{
"date": "2018-08-30",
"status": "Second Sign"
}]
}]
}];
let result = clients.filter(cl => cl.contracts.some(c => c.revisions.some(r => r.status == 'First Sign')));
console.log(result);
或
File file = new File(input.nextLine());
for (File f : file.listFiles()) {
f.delete();
}
答案 0 :(得分:0)