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

@ -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();