public class RenameUtil extends ContextAwareBase
| Modifier and Type | Field and Description |
|---|---|
(package private) static java.lang.String |
RENAMING_ERROR_URL |
context| Constructor and Description |
|---|
RenameUtil() |
| Modifier and Type | Method and Description |
|---|---|
(package private) java.lang.Boolean |
areOnDifferentVolumes(java.io.File srcFile,
java.io.File targetFile)
Attempts to determine whether both files are on different volumes.
|
(package private) void |
createMissingTargetDirsIfNecessary(java.io.File toFile) |
void |
rename(java.lang.String src,
java.lang.String target)
A relatively robust file renaming method which in case of failure due to
src and target being on different volumes, falls back onto
renaming by copying.
|
void |
renameByCopying(java.lang.String src,
java.lang.String target) |
java.lang.String |
toString() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic void rename(java.lang.String src,
java.lang.String target)
throws RolloverFailure
src - target - RolloverFailurejava.lang.Boolean areOnDifferentVolumes(java.io.File srcFile,
java.io.File targetFile)
throws RolloverFailure
srcFile - targetFile - RolloverFailurepublic void renameByCopying(java.lang.String src,
java.lang.String target)
throws RolloverFailure
RolloverFailurevoid createMissingTargetDirsIfNecessary(java.io.File toFile)
throws RolloverFailure
RolloverFailurepublic java.lang.String toString()
toString in class java.lang.Object