getDirectory method
Returns a Directory at uri
, creates it recursively if it doesn't exist.
Implementation
Directory getDirectory(Uri uri) {
final dir = Directory.fromUri(uri);
if (!dir.existsSync()) {
dir.createSync(recursive: true);
}
return dir;
}