Java Path Delete nio delete(Path targetPath)

Here you can find the source of delete(Path targetPath)

Description

delete

License

Open Source License

Declaration

private static void delete(Path targetPath) throws IOException 

Method Source Code


//package com.java2s;
/* FileUtils.java //from w  w  w . j  av a 2  s.c  o m
 * Copyright (c) 2012 by Brook Tran
 * All rights reserved.
 * 
 * The copyright of this software is own by the authors.
 * You may not use, copy or modify this software, except
 * in accordance with the license agreement you entered into 
 * with the copyright holders. For details see accompanying license
 * terms.
 */

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    private static void delete(Path targetPath) throws IOException {
        Files.delete(targetPath);
    }
}

Related

  1. delete(final String[] paths)
  2. delete(Path path)
  3. delete(Path path)
  4. delete(Path path)
  5. delete(Path root)
  6. delete(Path... paths)
  7. delete(String filePath, String fileName)
  8. delete(String targetFilePath)
  9. deleteAllFilesRecursively(Path path)