getFile method
Returns a File at uri
, creates all parent directories recursively if necessary.
Implementation
File getFile(Uri uri) {
final file = File.fromUri(uri);
if (!file.parent.existsSync()) {
file.parent.createSync(recursive: true);
}
return file;
}