Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/0opslab/opslabJutil
/ deleteFile
Method
deleteFile
src/main/java/com/opslab/util/FileUtil.java:421–423 ·
view source on GitHub ↗
删除一个文件 @param file 需要处理的文件 @return 是否成功
(File file)
Source
from the content-addressed store, hash-verified
419
* @
return
是否成功
420
*/
421
public
final
static
boolean deleteFile(File file) {
422
return
file.delete();
423
}
424
425
/**
426
* 删除一个目录
Callers
3
testDeleteFile
Method · 0.95
testDeleteFile
Method · 0.95
deleteDir
Method · 0.95
Calls
1
delete
Method · 0.80
Tested by
2
testDeleteFile
Method · 0.76
testDeleteFile
Method · 0.76