static Throwable delete(File file){
  try {
    Files.delete(file.toPath());
    return null;
  }
 catch (  SecurityException e) {
    throw e;
  }
catch (  Throwable other) {
    return other;
  }
}

static Throwable delete ( File file ) { try { Files . delete ( file . toPath ( ) ) ; return null ; } catch ( SecurityException e ) { throw e ; } catch ( Throwable other ) { return other ; } }
this simulates file . delete exception - wise , since this class has some strange behavior with it . the only difference is it returns null on success , throws securityexception on securityexception , otherwise returns throwable preventing deletion ( instead of false ) , for additional information .
