NIO2

 

Files工具包下包含创建临时文件, 文件copy, move等API

1 Path tempFile = Files.createTempFile(null, ".tmp");
2 // 不会自动删除, 除非重启机器
3 Files.deleteIfExists(tempFile);

 

posted @ 2018-07-16 11:26  funny_coding  阅读(116)  评论(0编辑  收藏  举报
build beautiful things, share happiness