下载文件包含多级路径时,创建父文件夹

pull/26/head
xiaoso 2 years ago
parent e98422550e
commit f857f2dab9

@ -27,6 +27,7 @@ public class AustinFileUtils {
URL url = new URL(remoteUrl);
File file = new File(path, url.getPath());
if (!file.exists()) {
file.getParentFile().mkdirs();
IoUtil.copy(url.openStream(), new FileOutputStream(file));
}
return file;

Loading…
Cancel
Save