|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.karaf.main.Utils
public class Utils
Constructor Summary | |
---|---|
Utils()
|
Method Summary | |
---|---|
static void |
cleanDirectory(java.io.File directory)
Clean a directory without deleting it. |
static void |
deleteDirectory(java.io.File directory)
Recursively delete a directory. |
static void |
forceDelete(java.io.File file)
Delete a file. |
static java.io.File |
getKarafDirectory(java.lang.String directoryProperty,
java.lang.String directoryEnvironmentVariable,
java.io.File defaultValue,
boolean create,
boolean validate)
|
static java.io.File |
getKarafHome()
|
static java.io.File |
validateDirectoryExists(java.lang.String path,
java.lang.String errPrefix,
boolean createDirectory,
boolean validate)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static java.io.File getKarafHome() throws java.io.IOException
java.io.IOException
public static java.io.File validateDirectoryExists(java.lang.String path, java.lang.String errPrefix, boolean createDirectory, boolean validate)
public static java.io.File getKarafDirectory(java.lang.String directoryProperty, java.lang.String directoryEnvironmentVariable, java.io.File defaultValue, boolean create, boolean validate)
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
Delete a file. If file is a directory, delete it and all sub-directories.
The difference between File.delete() and this method are:
file
- file or directory to delete.
java.io.IOException
- in case deletion is unsuccessful
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |