ensureFileExists static method
Implementation
static Future<void> ensureFileExists(
String path, {
bool force = false,
}) async {
final file = File(path);
if (force && await file.exists()) {
await file.delete();
}
if (!await file.exists()) {
await file.create(recursive: true);
}
}