Output report file size to console

This commit is contained in:
zontreck 2024-08-24 07:44:37 -07:00
parent 2af235fca0
commit d4ecb34c03

View file

@ -16,7 +16,7 @@ import 'package:libac_dart/consts.dart';
import 'package:libac_dart/utils/IOTools.dart';
Future<int> main(List<String> args) async {
String VERSION = "1.0.082424.0720";
String VERSION = "1.0.082424.0744";
bool verbose = false;
String HEADER =
"Make File System Report\nVersion: $VERSION\nUsing LibAC Version: ${Constants.VERSION}\nAuthor: Tara Piccari\n\n";
@ -71,6 +71,11 @@ Future<int> main(List<String> args) async {
await prnt("\n> Saving report...");
await File(outputPath.value).writeAsString(report);
await prnt("\n> Task Completed\n");
var size = await File(outputPath.value).length();
FileInfo savedFile =
FileInfo(path: outputPath.value, size: size, isFile: true);
await prnt("> Report file size: ${savedFile.toString()}\n\n");
} else {
print(report);
}