testFile method

Future<bool> testFile(
  1. String path,
  2. String mode, {
  3. bool debug = false,
})

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';
  });
}