Fix status messages

This commit is contained in:
zontreck 2024-08-24 07:06:43 -07:00
parent 676684397e
commit 86070dc8b9
4 changed files with 10 additions and 9 deletions

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.0524";
String VERSION = "1.0.082424.0706";
String HEADER =
"Make File System Report\nVersion: $VERSION\nUsing LibAC Version: ${Constants.VERSION}\nAuthor: Tara Piccari\n\n";
@ -58,10 +58,11 @@ Future<int> main(List<String> args) async {
await generateHTMLReport(FIC, ascending: ascending, VERSION: VERSION);
if (parsed.hasArg("o")) {
prnt("> Generating report...\r");
prnt("\r> Generating report...");
StringArgument outputPath = parsed.getArg("o") as StringArgument;
prnt("\n> Saving report...");
await File(outputPath.value).writeAsString(report);
prnt("\r> Task Completed\n");
prnt("\n> Task Completed\n");
} else {
print(report);
}

View file

@ -1,3 +1,3 @@
class Constants {
static const VERSION = "1.2.082424+0701";
static const VERSION = "1.2.082424+0704";
}

View file

@ -218,12 +218,12 @@ class FileInfo {
Future<int> getFileSize(String path,
{bool cacheSize = false, bool verbose = false}) async {
if (verbose) await prnt("${trunc("> Checking size of file $path")}\r");
if (verbose) await prnt("${trunc("\r> Checking size of file $path")}");
/*final fileBytes = await File(path).readAsBytes();
int size = fileBytes.lengthInBytes;*/
final size = await File(path).length();
if (verbose) await prnt("${trunc(">> Size of file $path")} is $size bytes\r");
if (verbose) await prnt("${trunc("\r>> Size of file $path")} is $size bytes");
if (cacheSize) {
FileInformationCache FIC = FileInformationCache.obtain();
@ -238,7 +238,7 @@ Future<int> getDirectorySize(String path,
bool cacheSize = false,
bool verbose = false}) async {
int totalSize = 0;
if (verbose) await prnt("${trunc("> Check dir size of $path")}\r");
if (verbose) await prnt("\r${trunc("> Check dir size of $path")}");
final entityList =
await Directory(path).list(recursive: false, followLinks: true).toList();
@ -253,7 +253,7 @@ Future<int> getDirectorySize(String path,
});
if (verbose)
await prnt("${trunc(">> Size of dir $path")} is $totalSize bytes\r");
await prnt("${trunc("\r>> Size of dir $path")} is $totalSize bytes");
if (cacheSize) {
FileInformationCache FIC = FileInformationCache.obtain();

View file

@ -1,6 +1,6 @@
name: libac_dart
description: "Aria's Creations code library"
version: 1.2.082424+0701
version: 1.2.082424+0704
homepage: "https://zontreck.com"