feat: update wget.ts

This commit is contained in:
2025-01-19 13:23:16 +08:00
parent 537e25a40b
commit e5a2977162
2 changed files with 11 additions and 3 deletions

View File

@@ -126,4 +126,12 @@ if (contentLength !== null) {
await response.body?.pipeTo(outputFileWritable);
clearInterval(stateFileInterVal);
await clearLastLine();
console.log("Download finished.");
const costTime = new Date().getTime() - startTime;
const fileInfo = await Deno.stat(outputFilename);
const fileSize = fileInfo.size;
console.log(
`Download finished, size: ${formatSize2(fileSize)}, time: ${
formatHumanTime(costTime)
}`,
);