testFile method
Implementation
Future<bool> testFile(String path, String mode, {bool debug = false}) async {
return exec(['test -$mode $path && echo 1 || echo 0'], debug: debug).then((result) {
return result.stdout.toString().trim() == '1';
});
}