Java Directory Delete emptyDirectory(File dir)

Here you can find the source of emptyDirectory(File dir)

Description

empty Directory

License

Apache License

Declaration

private static void emptyDirectory(File dir) 

Method Source Code


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

import java.io.File;

public class Main {
    private static void emptyDirectory(File dir) {
        for (File f : dir.listFiles()) {
            f.delete();/*w w w . j av a2s .com*/
        }
    }
}

Related

  1. emptyDir(File dir)
  2. emptyDir(File dir)
  3. emptyDir(File directory)
  4. emptyDir(String dirName)
  5. emptyDir(String path)
  6. emptyDirectory(File dir)
  7. emptyDirectory(File dir)
  8. emptyDirectory(File dir)
  9. emptyDirectory(File directory)