Does Files.createTempDirectory remove the directory after JVM exits normally?

前端 未结 5 812
滥情空心
滥情空心 2020-12-15 04:06

Does Files.createTempDirectory remove the directory after JVM exits normally? Or do I need to manually recursively remove the temporary directory content?

5条回答
  •  爱一瞬间的悲伤
    2020-12-15 04:52

    No, it doesn't. You have to do it on your own. Or use java.io.File.deleteOnExit() but I guess it doesn't work for non-empty directories

提交回复
热议问题