public class FileRenameAction extends AbstractAction
LOGGER
Constructor and Description |
---|
FileRenameAction(File src,
File dst,
boolean renameEmptyFiles)
Creates an FileRenameAction.
|
Modifier and Type | Method and Description |
---|---|
boolean |
execute()
Rename file.
|
static boolean |
execute(File source,
File destination,
boolean renameEmptyFiles)
Rename file.
|
File |
getDestination()
Gets the destination.
|
File |
getSource()
Gets the source.
|
boolean |
isRenameEmptyFiles()
Whether to rename empty files.
|
String |
toString() |
close, isComplete, isInterrupted, reportException, run
public FileRenameAction(File src, File dst, boolean renameEmptyFiles)
src
- current file name.dst
- new file name.renameEmptyFiles
- if true, rename file even if empty, otherwise delete empty files.public boolean execute()
execute
in interface Action
execute
in class AbstractAction
public File getDestination()
public boolean isRenameEmptyFiles()
public static boolean execute(File source, File destination, boolean renameEmptyFiles)
source
- current file name.destination
- new file name.renameEmptyFiles
- if true, rename file even if empty, otherwise delete empty files.Copyright © 1999-2020 The 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.