|
|
@@ -43,12 +43,13 @@ public class ResourceDownloadTool {
|
|
|
destPath = savePath;
|
|
|
}
|
|
|
|
|
|
- long file = HttpUtil.downloadFile(url, destPath);
|
|
|
+ long fileSize = HttpUtil.downloadFile(url, destPath);
|
|
|
+ File downloadedFile = new File(destPath);
|
|
|
|
|
|
String result = String.format(
|
|
|
"文件下载成功\n保存路径: %s\n文件大小: %s",
|
|
|
- file,
|
|
|
- FileUtil.readableFileSize(file)
|
|
|
+ downloadedFile.getAbsolutePath(),
|
|
|
+ FileUtil.readableFileSize(fileSize)
|
|
|
);
|
|
|
|
|
|
log.info(result);
|