createDirectory function
Create a directory recursively
Implementation
Future<Directory> createDirectory(Directory dir,
{CreateOptions? options}) async {
options ??= defaultCreateOptions;
if (options.delete) {
await deleteDirectory(dir);
}
await dir.create(recursive: options.recursive);
return dir;
}