Java File Delete doDeleteEmptyDir(String dir)

Here you can find the source of doDeleteEmptyDir(String dir)

Description

do Delete Empty Dir

License

Open Source License

Declaration

public static void doDeleteEmptyDir(String dir) 

Method Source Code


//package com.java2s;
import java.io.File;

public class Main {

    public static void doDeleteEmptyDir(String dir) {
        boolean success = (new File(dir)).delete();
        if (success) {
            System.out.println("Successfully deleted empty directory: " + dir);
        } else {//from  ww w.ja  va 2  s  .  c  o  m
            System.out.println("Failed to delete empty directory: " + dir);
        }
    }
}

Related

  1. delete(File file)
  2. doDelete(File f)
  3. doDelete(File file)
  4. doDelete(File file)
  5. doDelete(File path)
  6. doDeleteEmptyParentQuietly(File parent)
  7. doDeleteFileOrDir(File fileOrDir)
  8. doDeleteQuietly(File file)
  9. fileDelete(String fileName)