deleteDirectory static method
Implementation
static Future deleteDirectory(String directory, {bool recursive = false}) {
Directory folder = Directory(directory);
return folder.exists().then(
(exists) => (exists) ? folder.delete(recursive: recursive) : null);
}