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 String
RETRY_COUNT
static String
RETRY_INTERVAL
-
Constructor Summary
Constructors Constructor Description SaferIOOperation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copyDir(File p_fileDst, File p_fileSrc)
static void
copyFile(File p_fileDst, File p_fileSrc)
static boolean
delete(File p_fileToDel)
static boolean
deleteDir(Path p_dir)
static boolean
mkdir(File p_dir)
static boolean
mkdirs(File p_dir)
static boolean
renameTo(File p_fileSrc, File p_fileDst)
static boolean
renameTo(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
true
if 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
true
if 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)
-
-