createOrExistsFile static method
Implementation
static bool createOrExistsFile(String filePath) {
final file = File(filePath);
if (file.existsSync()) return true;
final dirPath = path.dirname(filePath);
if (!createOrExistsDir(dirPath)) return false;
try {
file.createSync();
return true;
} catch (_) {
return false;
}
}