public class DirectoryUtil extends Object
| Constructor and Description |
|---|
DirectoryUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteDir(String dirName)
Deletes directory including the sub directories.
|
static String[] |
getFolderNameListing(File aDir)
Util method to get the list of folders.
|
static boolean |
isMarked(File dir)
Determies if a given directory has been marked for deletion.
|
static File[] |
listFiles(File root,
Pattern prefix)
Returns a list of files within the specified directory that start with
the specified prefix.
|
static void |
markDir(String dirName)
Mark a directory for deletion by adding a .DELETE_ME file
|
static boolean |
removeDir(String dirName)
Complements deleteDir, but provides a more comprehensive contract
for removal of a directory.
|
static void |
removeMarkedDirs(String root)
Finds all marked child directories of parent and deletes them.
|
public static void deleteDir(String dirName) throws Exception
dirName - Name of the directory to deleteException - If failed to delete directorypublic static boolean removeDir(String dirName)
public static void markDir(String dirName)
public static void removeMarkedDirs(String root)
public static String[] getFolderNameListing(File aDir)
aDir - folder name for which contents have to be listed.public static boolean isMarked(File dir)
Copyright © 2011-2016 OpenESB Community. All Rights Reserved.