Java File Path Delete deletePathRecursive(File path)

Here you can find the source of deletePathRecursive(File path)

Description

delete Path Recursive

License

Open Source License

Declaration

public static boolean deletePathRecursive(File path) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    public static boolean deletePathRecursive(File path) {
        if (path.isDirectory()) {
            for (File file : path.listFiles()) {
                if (!deletePathRecursive(file))
                    return false;
            }/*from  w w  w  .j  a  v a2  s .co m*/
        }
        return path.delete();
    }
}

Related

  1. deleteOldStorageFile(String filepath)
  2. deleteParent(String filePath)
  3. deletePath(File dirPath)
  4. deletePath(File path)
  5. deletePath(final File path)
  6. deleteQuietly(Object path)
  7. deleteRecursive(File path)
  8. deleteRecursive(File path)
  9. deleteRecursive(File path)