public static void delete(File fileOrFolder){
  if (fileOrFolder != null)   delete(fileOrFolder.toPath());
}

public static void delete ( File fileOrFolder ) { if ( fileOrFolder != null ) delete ( fileOrFolder . toPath ( ) ) ; }
a method that will delete a file or folder only if it is within the ' target ' directory ( for safety ) . folders are removed recursively .
