Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java delete directory

boolean deleteDirectory(File directoryToBeDeleted) {
    File[] allContents = directoryToBeDeleted.listFiles();
    if (allContents != null) {
        for (File file : allContents) {
            deleteDirectory(file);
        }
    }
    return directoryToBeDeleted.delete();
}
Comment

java delete directory with files

import org.apache.commons.io.FileUtils;

FileUtils.deleteDirectory(new File(destination));
Comment

PREVIOUS NEXT
Code Example
Java :: Could not initialize class org.codehaus.groovy.vmplugin.VMPluginFactory 
Java :: The shrinker may have failed to optimize the Java bytecode. To disable the shrinker, pass the `--no-shrink` flag to this command. 
Java :: java ip regex 
Java :: how to measure the running time of a code section in java? 
Java :: how to delete last char in string java 
Java :: java add text to GUI 
Java :: java measure execution time 
Java :: java double to string with comma 
Java :: how to set event priority in spigot 
Java :: java how to calculate fps 
Java :: java string join arraylist 
Java :: spigot get commandmap 
Java :: java elapsedTime 
Java :: java get all items from arraylist 
Java :: android studio linearlayout set margin 
Java :: java pause console 
Java :: jfilechooser file filter 
Java :: display default value of auto commit java 
Java :: How to efficiently count the number of smaller elements to the right of every array element, in Java? 
Java :: how to cnahe chat format in bukkit 
Java :: java jshell run string as code 
Java :: how to print text in java 
Java :: convert list to map java 
Java :: how to make a bot to wait in jda 
Java :: jersey test dependency 
Java :: frequency of number in java using hashmap using getordefault 
Java :: java array copy 
Java :: java initialize array with same value 
Java :: java add listent to button 
Java :: how to start activity in adapter android 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =