getSizeOfFileSystemItem method
return total size in bytes of file or directory , work on GNU/Linux systems, tested in debian 10
Implementation
int getSizeOfFileSystemItem(DirectoryItem item,
{bool isThrowException = true}) {
if (item.type == DirectoryItemType.directory) {
return getSizeOfDirectory(item.path, isThrowException: isThrowException);
} else {
return getSizeOfFile(item.path, isThrowException: isThrowException);
}
}