jcommon.core
Class FileUtil

java.lang.Object
  extended by jcommon.core.FileUtil

public class FileUtil
extends Object

Contains general-purpose file and directory manipulation utilities.


Constructor Summary
FileUtil()
           
 
Method Summary
static boolean deleteDirectory(File path)
          Uses an iterative algorithm to recursively delete an entire directory and all its subdirectories.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

deleteDirectory

public static final boolean deleteDirectory(File path)
Uses an iterative algorithm to recursively delete an entire directory and all its subdirectories. Could be revised later for Java v1.7 compatibility by using Files.walkFileTree().

Parameters:
path - The directory to be deleted.
Returns:
true if the entire directory and all subdirectories were removed; false otherwise.
See Also:
http://fahdshariff.blogspot.com/2011/08/java-7-deleting-directory-by-walking.html


Copyright © 2012-2013. All Rights Reserved.