Java Path Delete nio deleteFile(String path)

Here you can find the source of deleteFile(String path)

Description

delete File

License

Apache License

Declaration

public static void deleteFile(String path) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

import java.io.IOException;

import java.nio.file.Files;

public class Main {
    public static void deleteFile(String path) throws IOException {
        Files.delete(new File(path).toPath());
    }//from   w ww. j a v a  2  s  .  c o  m
}

Related

  1. deleteFile(Path p)
  2. deleteFile(Path path)
  3. deleteFile(Path path)
  4. deleteFile(Path path)
  5. deleteFile(String filePath)
  6. deleteFilesIfExist(Path... files)
  7. deleteFilesIgnoringExceptions(final Path... files)
  8. deleteFilesRecursively(Path path, final PathMatcher pathMatcher)
  9. deleteIfExists(Path thePath)