标红的代码意义是啥?

半颗心丶 2015-06-26 03:01:05
public static void newFolder(String folderPath) {
try {
String filePath = folderPath;
filePath = filePath.toString();

java.io.File myFilePath = new java.io.File(filePath);
System.out.println(myFilePath);
if (!myFilePath.exists()&&!myFilePath.isDirectory()) {
myFilePath.mkdirs();
System.out.println("目录创建成功!");
}
} catch (Exception e) {
System.out.println("新建目录操作出错");
e.printStackTrace();
}
}
...全文
118 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
xuzuning 2015-06-26
  • 打赏
  • 举报
回复
filePath = filePath.toString(); 蛇足

5,655

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧