Java File Path Delete deleteDir(File file)

Here you can find the source of deleteDir(File file)

Description

delete Dir

License

Apache License

Declaration

public static void deleteDir(File file) 

Method Source Code


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

import java.io.File;

public class Main {
    public static void deleteDir(File file) {
        if (file.isDirectory()) {
            for (File child : file.listFiles()) {
                deleteDir(child);//w  w  w . ja v  a2  s . c om
            }
        }
        file.delete();
    }
}

Related

  1. deleteDir(File dirPath)
  2. deleteDir(File f)
  3. deleteDir(File f)
  4. deleteDir(File f)
  5. deleteDir(File fDir)
  6. deleteDir(File path)
  7. deleteDir(File path)
  8. deleteDir(File path)
  9. deleteDir(File path)