public class DeployDirUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DeployDirUtil.DeployDirListener |
| Constructor and Description |
|---|
DeployDirUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addListener(DeployDirUtil.DeployDirListener listener) |
static boolean |
contains(File file) |
static boolean |
delete(File file)
Delete a given file or directory if it's under a deployment directory.
|
static boolean |
deleteWithRetry(File file,
int maxAttempts,
int delayMs)
Same as
delete(File), but with options to retry the deletion if it fails. |
static File |
getDefaultDir() |
static void |
register(File dir) |
static void |
register(URI uri) |
static void |
register(URI[] uris) |
static void |
register(URL url) |
public static void register(URI[] uris) throws MalformedURLException
MalformedURLExceptionpublic static void register(URI uri) throws MalformedURLException
MalformedURLExceptionpublic static void register(URL url)
public static void register(File dir)
public static boolean contains(File file)
true if the given file is under a deployment directory.public static boolean delete(File file) throws Exception
file - file/directory to be deleted.true if the file/directory was under a deployment directory and got deleted.Exceptionpublic static boolean deleteWithRetry(File file, int maxAttempts, int delayMs) throws Exception
delete(File), but with options to retry the deletion if it fails.maxAttempts - Max number of deletion attemptsdelayMs - Delay between attemps, in millisecondsExceptionpublic static File getDefaultDir()
public static void addListener(DeployDirUtil.DeployDirListener listener)
Copyright © 2016. All rights reserved.