reset method

Future<Directory> reset({
  1. bool recursive = true,
})

If Directory already exists delete all its contents and create it again.

Implementation

Future<Directory> reset({bool recursive = true}) async {
  if (await exists()) {
    await delete(recursive: recursive);
  }
  return create(recursive: recursive);
}