Java Delete File deleteFile(String name)

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

Description

delete File

License

Open Source License

Declaration

public static void deleteFile(String name) 

Method Source Code

//package com.java2s;
// Use of this source code is governed by a BSD-style license that can be

import java.io.File;

public class Main {
    public static void deleteFile(String name) {
        deleteFile(new File(name));
    }/*  w ww .j av  a 2  s . co  m*/

    public static void deleteFile(File file) {
        boolean deleted = file.delete();
        assert (deleted || !file.exists());
    }
}

Related

  1. deleteFile(String fileName)
  2. deleteFile(String filename)
  3. deleteFile(String fileName)
  4. deleteFile(String filename)
  5. deleteFile(String name)