Delete file if exists.

@param name Filename to delete.
195156
private void delete(String name) {
        File f = new File(name);
        if (f.exists()) {
            f.delete();
        }
    }
625224
public synchronized void setFilename(String filename)
    {
        if (filename!=null)
        {
            filename=filename.trim();
            if (filename.length()==0)
                filename=null;
        }
        
        if (isStarted() && _filename!=null && filename==null)
            _out=null;
        
        _reopen=isStarted() &&
            ((_filename==null && filename!=null)||
             (_filename!=null && !_filename.equals(filename)));
        _filename=filename;

        if (!isStarted() && _filename!=null)
            _out=null;
    }
234061
public static boolean isValid(final String name) {
        if (name == null) {
            return true;
        }
        for (final FileHandlerResult result : INSTANCES) {
            if (result.name.equals(name)) {
                return true;
            }
        }
        return false;
    }
869778
public void delete(String name) throws IOException {
        if (name.equalsIgnoreCase(KEY_ID)) {
            id = null;
        } else if (name.equalsIgnoreCase(AUTH_NAME)) {
            names = null;
        } else if (name.equalsIgnoreCase(SERIAL_NUMBER)) {
            serialNum = null;
        } else {
          throw new IOException("Attribute name not recognized by " +
                        "CertAttrSet:AuthorityKeyIdentifier.");
        }
        encodeThis();
    }
365003
public static base_response delete(nitro_service client, String filename) throws Exception {
		systembackup deleteresource = new systembackup();
		deleteresource.filename = filename;
		return deleteresource.delete_resource(client);
	}
1257699
def delete(key)
      file = filename key
      File.delete file if File.exist? file
    end
958758
public void deleteTmpFile(String name, JobID jobID) {
		DeleteProcess dp = new DeleteProcess(name, jobID, count.get(new ImmutablePair(jobID,name)));
		executorService.schedule(dp, 5000L, TimeUnit.MILLISECONDS);
	}
964059
def remove_file(filename)
      return if @sandbox

      file_path = File.join(Configuration.instance.get(:path), filename)
      File.delete(file_path) if File.exist?(file_path)
    end
879798
public void delete(String name) throws IOException {
        if (name.equalsIgnoreCase(DIGITAL_SIGNATURE)) {
            set(0,false);
        } else if (name.equalsIgnoreCase(NON_REPUDIATION)) {
            set(1,false);
        } else if (name.equalsIgnoreCase(KEY_ENCIPHERMENT)) {
            set(2,false);
        } else if (name.equalsIgnoreCase(DATA_ENCIPHERMENT)) {
            set(3,false);
        } else if (name.equalsIgnoreCase(KEY_AGREEMENT)) {
            set(4,false);
        } else if (name.equalsIgnoreCase(KEY_CERTSIGN)) {
            set(5,false);
        } else if (name.equalsIgnoreCase(CRL_SIGN)) {
            set(6,false);
        } else if (name.equalsIgnoreCase(ENCIPHER_ONLY)) {
            set(7,false);
        } else if (name.equalsIgnoreCase(DECIPHER_ONLY)) {
            set(8,false);
        } else {
          throw new IOException("Attribute name not recognized by"
                                + " CertAttrSet:KeyUsage.");
        }
        encodeThis();
    }
591295
public void delete() {
    try {
      getDFS().delete(this.path, true);

    } catch (IOException e) {
      e.printStackTrace();
      MessageDialog.openWarning(null, "Delete file",
          "Unable to delete file \"" + this.path + "\"\n" + e);
    }
  }
1317804
public function delete($name)
    {
        if (file_exists(route()->com.$name)) {
            (new Files())->deleteDir(route()->com.$name);
        }
    }
14125
public function deleteFile($name = null)
    {
        foreach ($this->getAllFields() as $field) {
            $path = $this->getFilePath($field, $name);
            if (!$path || !is_file($path) || !file_exists($path)) {
                continue;
            }
            unlink($path);
        }
        if ($name == $this->owner->getAttribute($this->fileField)
           && ($files = $this->getFileList())     
        ) {
            $this->owner->updateAttributes([$this->fileField => reset($files)]);
        }
        return true;
    }
1054437
public boolean deleteIndex(String name) throws IOException {
        CloseableHttpClient client = HttpClients.createDefault();
        HttpDelete delete = new HttpDelete(String.format("http://%s:%d/%s", host, port, name));
        try {
            CloseableHttpResponse resp = client.execute(delete);
            return resp.getStatusLine().getStatusCode() == HttpStatus.SC_OK;
        } finally {
            delete.releaseConnection();
        }
    }
42890
public void delete(String name) throws IOException {
        if (name.equalsIgnoreCase(DN_NAME)) {
            dnName = null;
            dnPrincipal = null;
        } else {
            throw new IOException("Attribute name not recognized by " +
                                  "CertAttrSet:CertificateIssuerName.");
        }
    }
752318
@RequestMapping(value = "/{name}", method = RequestMethod.DELETE)
	@ResponseStatus(HttpStatus.OK)
	protected void delete(@PathVariable("name") String name) {
		Metric<Double> c = findCounter(name);
		metricRepository.reset(c.getName());
	}
438656
def remove_file(path, remove=os.remove, exists=os.path.exists):
    """"""
    try:
        remove(path)
    except OSError:
        if exists(path):
            raise
1133477
public void remove(String name) {
        EndpointService<L, S> service = endpointServices.remove(name);
        if (service != null) {
            service.stop();
            log.infoRemovedEndpointService(service.toString());
        }
    }