Package de.uplanet.util.transaction
Class SaferIOOperation
- java.lang.Object
-
- de.uplanet.util.transaction.SaferIOOperation
-
public final class SaferIOOperation extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringRETRY_COUNTstatic StringRETRY_INTERVAL
-
Constructor Summary
Constructors Constructor Description SaferIOOperation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopyDir(File p_fileDst, File p_fileSrc)static voidcopyFile(File p_fileDst, File p_fileSrc)static booleandelete(File p_fileToDel)static booleandeleteDir(Path p_dir)static booleanmkdir(File p_dir)static booleanmkdirs(File p_dir)static booleanrenameTo(File p_fileSrc, File p_fileDst)static booleanrenameTo(Path p_fileSrc, Path p_fileDst)
-
-
-
Field Detail
-
RETRY_INTERVAL
@SystemProperty(defaultValue="300") public static final String RETRY_INTERVAL
- See Also:
- Constant Field Values
-
RETRY_COUNT
@SystemProperty(defaultValue="3") public static final String RETRY_COUNT
- See Also:
- Constant Field Values
-
-
Method Detail
-
renameTo
public static boolean renameTo(File p_fileSrc, File p_fileDst)
- Parameters:
p_fileSrc- The source file or directory to movep_fileDst- The destination file or directory.- Returns:
- Returns
trueif rename success otherwisefalse
-
renameTo
public static boolean renameTo(Path p_fileSrc, Path p_fileDst)
- Parameters:
p_fileSrc- The source file or directory to movep_fileDst- The destination file or directory.- Returns:
- Returns
trueif rename success otherwisefalse
-
mkdir
public static boolean mkdir(File p_dir)
-
mkdirs
public static boolean mkdirs(File p_dir)
-
copyFile
public static void copyFile(File p_fileDst, File p_fileSrc) throws IOException
- Throws:
IOException
-
copyDir
public static void copyDir(File p_fileDst, File p_fileSrc) throws IOException
- Throws:
IOException
-
delete
public static boolean delete(File p_fileToDel)
-
deleteDir
public static boolean deleteDir(Path p_dir)
-
-