delete method

void delete(
  1. Directory directory,
  2. File file
)

Implementation

void delete(Directory directory, File file) {
  file.deleteSync();
  directory.deleteSync(recursive: true);
}