dir static method

Directory dir(
  1. ArgResults argResults,
  2. Never usageException(
    1. String message
    )
)

Implementation

static Directory dir(
  ArgResults argResults,
  Never Function(String message) usageException,
) {
  final path = argResults.requireParam(_name);
  final dir = Directory(path);
  if (!dir.existsSync()) {
    usageException('Not found directory: $path');
  }
  return dir;
}