Fix status messages
This commit is contained in:
parent
676684397e
commit
86070dc8b9
4 changed files with 10 additions and 9 deletions
|
@ -16,7 +16,7 @@ import 'package:libac_dart/consts.dart';
|
||||||
import 'package:libac_dart/utils/IOTools.dart';
|
import 'package:libac_dart/utils/IOTools.dart';
|
||||||
|
|
||||||
Future<int> main(List<String> args) async {
|
Future<int> main(List<String> args) async {
|
||||||
String VERSION = "1.0.082424.0524";
|
String VERSION = "1.0.082424.0706";
|
||||||
String HEADER =
|
String HEADER =
|
||||||
"Make File System Report\nVersion: $VERSION\nUsing LibAC Version: ${Constants.VERSION}\nAuthor: Tara Piccari\n\n";
|
"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);
|
await generateHTMLReport(FIC, ascending: ascending, VERSION: VERSION);
|
||||||
|
|
||||||
if (parsed.hasArg("o")) {
|
if (parsed.hasArg("o")) {
|
||||||
prnt("> Generating report...\r");
|
prnt("\r> Generating report...");
|
||||||
StringArgument outputPath = parsed.getArg("o") as StringArgument;
|
StringArgument outputPath = parsed.getArg("o") as StringArgument;
|
||||||
|
prnt("\n> Saving report...");
|
||||||
await File(outputPath.value).writeAsString(report);
|
await File(outputPath.value).writeAsString(report);
|
||||||
prnt("\r> Task Completed\n");
|
prnt("\n> Task Completed\n");
|
||||||
} else {
|
} else {
|
||||||
print(report);
|
print(report);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
class Constants {
|
class Constants {
|
||||||
static const VERSION = "1.2.082424+0701";
|
static const VERSION = "1.2.082424+0704";
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,12 +218,12 @@ class FileInfo {
|
||||||
|
|
||||||
Future<int> getFileSize(String path,
|
Future<int> getFileSize(String path,
|
||||||
{bool cacheSize = false, bool verbose = false}) async {
|
{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();
|
/*final fileBytes = await File(path).readAsBytes();
|
||||||
int size = fileBytes.lengthInBytes;*/
|
int size = fileBytes.lengthInBytes;*/
|
||||||
final size = await File(path).length();
|
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) {
|
if (cacheSize) {
|
||||||
FileInformationCache FIC = FileInformationCache.obtain();
|
FileInformationCache FIC = FileInformationCache.obtain();
|
||||||
|
@ -238,7 +238,7 @@ Future<int> getDirectorySize(String path,
|
||||||
bool cacheSize = false,
|
bool cacheSize = false,
|
||||||
bool verbose = false}) async {
|
bool verbose = false}) async {
|
||||||
int totalSize = 0;
|
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 =
|
final entityList =
|
||||||
await Directory(path).list(recursive: false, followLinks: true).toList();
|
await Directory(path).list(recursive: false, followLinks: true).toList();
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ Future<int> getDirectorySize(String path,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (verbose)
|
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) {
|
if (cacheSize) {
|
||||||
FileInformationCache FIC = FileInformationCache.obtain();
|
FileInformationCache FIC = FileInformationCache.obtain();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: libac_dart
|
name: libac_dart
|
||||||
description: "Aria's Creations code library"
|
description: "Aria's Creations code library"
|
||||||
version: 1.2.082424+0701
|
version: 1.2.082424+0704
|
||||||
homepage: "https://zontreck.com"
|
homepage: "https://zontreck.com"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue