org.jboss.dna.common.util
Class FileUtil

java.lang.Object
  extended by org.jboss.dna.common.util.FileUtil

public class FileUtil
extends java.lang.Object


Constructor Summary
FileUtil()
           
 
Method Summary
static boolean delete(java.io.File fileOrDirectory)
          Delete the file or directory given by the supplied reference.
static boolean delete(java.lang.String path)
          Delete the file or directory at the supplied path.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

delete

public static boolean delete(java.lang.String path)
Delete the file or directory at the supplied path. This method works on a directory that is not empty, unlike the File.delete() method.

Parameters:
path - the path to the file or directory that is to be deleted
Returns:
true if the file or directory at the supplied path existed and was successfully deleted, or false otherwise

delete

public static boolean delete(java.io.File fileOrDirectory)
Delete the file or directory given by the supplied reference. This method works on a directory that is not empty, unlike the File.delete() method.

Parameters:
fileOrDirectory - the reference to the Java File object that is to be deleted
Returns:
true if the supplied file or directory existed and was successfully deleted, or false otherwise


Copyright © 2008. All Rights Reserved.