new File(filePath);
要确保有上级目录
new File(filePath.substring(0,filePath.lastIndexOf(File.separator))).mkdirs();
否则会报找不到路径
new File();踩坑
最新推荐文章于 2024-05-21 22:13:42 发布
new File(filePath);
要确保有上级目录
new File(filePath.substring(0,filePath.lastIndexOf(File.separator))).mkdirs();
否则会报找不到路径