28 lines
623 B
Java
28 lines
623 B
Java
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
package DateiKopieren;
|
|
|
|
/**
|
|
*
|
|
* @author simonr
|
|
*/
|
|
import forgemodpackbuilder.GUI;
|
|
import java.io.File;
|
|
|
|
public class FileDeleteExample {
|
|
|
|
public static void main(String[] args) {
|
|
File file = new File(GUI.datei);
|
|
|
|
//Zuvor alle mit dem File assoziierten Streams schließen...
|
|
|
|
if(file.exists()){
|
|
file.delete();
|
|
}
|
|
|
|
System.out.println("File deleted");
|
|
}
|
|
}
|