|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.util.http.fileupload.FileUtils
public class FileUtils
General file manipulation utilities.
Facilities are provided in the following areas:
Origin of code: Excalibur, Alexandria, Commons-Utils
Constructor Summary | |
---|---|
FileUtils()
Instances should NOT be constructed in standard programming. |
Method Summary | |
---|---|
static void |
cleanDirectory(java.io.File directory)
Cleans a directory without deleting it. |
static void |
deleteDirectory(java.io.File directory)
Deletes a directory recursively. |
static void |
forceDelete(java.io.File file)
Deletes a file. |
static void |
forceDeleteOnExit(java.io.File file)
Schedules a file to be deleted when JVM exits. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtils()
Method Detail |
---|
public static void deleteDirectory(java.io.File directory) throws java.io.IOException
directory
- directory to delete
java.io.IOException
- in case deletion is unsuccessfulpublic static void cleanDirectory(java.io.File directory) throws java.io.IOException
directory
- directory to clean
java.io.IOException
- in case cleaning is unsuccessfulpublic static void forceDelete(java.io.File file) throws java.io.IOException
The difference between File.delete() and this method are:
file
- file or directory to delete, must not be null
java.lang.NullPointerException
- if the directory is null
java.io.FileNotFoundException
- if the file was not found
java.io.IOException
- in case deletion is unsuccessfulpublic static void forceDeleteOnExit(java.io.File file) throws java.io.IOException
file
- file or directory to delete, must not be null
java.lang.NullPointerException
- if the file is null
java.io.IOException
- in case deletion is unsuccessful
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |