code: public static void checkRemoveOK(Resource resource) throws IOException {
  	if (!resource.exists()) throw new IOException("can't delete resource " + resource + ", resource does not exist");
  	if (!resource.canWrite()) throw new IOException("can't delete resource " + resource + ", no access");
  
      }
docs: check if removing the file is ok with the rules for the Resource interface, to not change this
  rules.
  
  @param resource
  @throws IOException