executeFileIfExist method
Implementation
Future<int> executeFileIfExist(File file) async {
if (!await file.exists()) {
return 0;
}
final process = await Process.start(file.path, [], runInShell: true);
await stdout.addStream(process.stdout);
await stderr.addStream(process.stderr);
return process.exitCode;
}