Java File Delete doDelete(File file)

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

Description

do Delete

License

Apache License

Declaration

private static boolean doDelete(File file) 

Method Source Code


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

import java.io.File;

public class Main {
    private static boolean doDelete(File file) {
        if (!file.isDirectory())
            return file.delete();
        File[] files = file.listFiles();
        if (files == null)
            return file.delete();

        for (File child : files) {
            if (!doDelete(child))
                return false;
        }/* w w w  .ja  va  2s.co  m*/
        return file.delete();
    }
}

Related

  1. delete(File file)
  2. delete(File file)
  3. delete(File file)
  4. delete(File file)
  5. doDelete(File f)
  6. doDelete(File file)
  7. doDelete(File path)
  8. doDeleteEmptyDir(String dir)
  9. doDeleteEmptyParentQuietly(File parent)