getQuota method

Future<QuotaResult> getQuota({
  1. String quotaRoot = '""',
})

Retrieves the quota for the user/quotaRoot.

Optionally define the quotaRoot which defaults to "". Note that the server needs to support the QUOTA capability.

Implementation

Future<QuotaResult> getQuota({String quotaRoot = '""'}) {
  quotaRoot = quotaRoot.contains(' ') ? '"$quotaRoot"' : quotaRoot;
  final cmd = Command('GETQUOTA $quotaRoot');
  final parser = QuotaParser();
  return sendCommand<QuotaResult>(cmd, parser);
}