# getInstanceSize function

String getInstanceSize(

1. String name

)

Get instance size for `name` instance.

## Implementation

    String getInstanceSize(String name) {
      var path = getInstancePath(name).file('ext4.vhdx');
      try {
        var size = File(path).lengthSync();

        if (size > 0) {
          var sizeGB = size / 1024 / 1024 / 1024;
          return '${sizeGB.toStringAsFixed(2)} GB';
        } else {
          return '';
        }
      } catch (e) {
        return '';
      }
    }