org.apache.logging.log4j.core.appender.rolling.action
Class FileRenameAction
java.lang.Object
org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
org.apache.logging.log4j.core.appender.rolling.action.FileRenameAction
- All Implemented Interfaces:
- Runnable, Action
public class FileRenameAction
- extends AbstractAction
File rename action.
Fields inherited from class org.apache.logging.log4j.core.appender.rolling.action.AbstractAction |
LOGGER |
FileRenameAction
public FileRenameAction(File src,
File dst,
boolean renameEmptyFiles)
- Creates an FileRenameAction.
- Parameters:
src
- current file name.dst
- new file name.renameEmptyFiles
- if true, rename file even if empty, otherwise delete empty files.
execute
public boolean execute()
- Rename file.
- Specified by:
execute
in interface Action
- Specified by:
execute
in class AbstractAction
- Returns:
- true if successfully renamed.
execute
public static boolean execute(File source,
File destination,
boolean renameEmptyFiles)
- Rename file.
- Parameters:
source
- current file name.destination
- new file name.renameEmptyFiles
- if true, rename file even if empty, otherwise delete empty files.
- Returns:
- true if successfully renamed.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.