首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
JAVA 如果文件夹不存在创建新的文件夹
JAVA 如果文件夹不存在创建新的文件夹
mac
2026-05-17
5
if (!(new File(desPath)).exists()) { (new File(desPath)).mkdirs(); } if (!(new File(desPath)).exists()) { (new File(desPath)).mkdir(); }
注意mkdir()和mkdirs()的区别!
转载请注明原文地址: https://mac.8miu.com/read-514118.html
最新回复
(
0
)