Package ch.qos.logback.core.rolling.helper

# Class RenameUtil

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.rolling.helper.RenameUtil

All Implemented Interfaces:
  `ContextAware`

public class RenameUtil extends ContextAwareBase
Utility class to help solving problems encountered while renaming files.

Author:
  Ceki Gulcu

## Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

## Constructor Summary

Constructors
Constructor
Description
`RenameUtil()`

## Method Summary

Modifier and Type
Method
Description
`void`
`rename(String src, 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(String src, String target)`
`String`
`toString()`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### RenameUtil

public RenameUtil()

## Method Details

### rename

public void rename(String src, String target) throws RolloverFailure
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.

Parameters:
  `src` -
  `target` -
Throws:
  `RolloverFailure`

### renameByCopying

public void renameByCopying(String src, String target) throws RolloverFailure

Throws:
  `RolloverFailure`

### toString

public String toString()

Overrides:
  `toString` in class `Object`