check method

Future<void> check({
  1. required Directory directory,
})
inherited

Returns true if the directory exists

Implementation

Future<void> check({required Directory directory}) async {
  // Does directory exist?
  final dirName = basename(canonicalize(directory.path));

  final dir = Directory(directory.path);
  if (!(await dir.exists())) {
    throw ArgumentError('Directory "$dirName" does not exist.');
  }
}