Class FileRemover
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.directories.FileRemover
-
public class FileRemover extends Object
- Author:
- Eugene Petrenko Created: 18.11.2008 20:46:09
-
-
Constructor Summary
Constructors Constructor Description FileRemover(DirectoryCleanerCallback callback)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
deleteDirNative(File dir)
Deletes dir using native command rd for windows and rm for *nixboolean
doDelete(File file, boolean makeCanonicalFirst)
boolean
doDelete(File file, boolean makeCanonicalFirst, boolean deleteSelf)
protected Comparator<File>
getFilesComparer()
protected boolean
isInterrupted()
boolean
isTooManyErrors()
static void
setErrorThreshold(int maxErrorsNum)
-
-
-
Constructor Detail
-
FileRemover
public FileRemover(DirectoryCleanerCallback callback)
-
-
Method Detail
-
isInterrupted
protected boolean isInterrupted()
-
isTooManyErrors
public boolean isTooManyErrors()
-
doDelete
public boolean doDelete(@NotNull File file, boolean makeCanonicalFirst)
-
setErrorThreshold
public static void setErrorThreshold(int maxErrorsNum)
-
doDelete
public boolean doDelete(@NotNull File file, boolean makeCanonicalFirst, boolean deleteSelf)
-
getFilesComparer
@NotNull protected Comparator<File> getFilesComparer()
-
deleteDirNative
public static boolean deleteDirNative(@NotNull File dir) throws ExecutionException
Deletes dir using native command rd for windows and rm for *nix- Parameters:
dir
- - dir to delete- Returns:
- true, if delete process returned 0 and target dir doesn't exist anymore, false otherwise
- Throws:
ExecutionException
-
-