public class RollingFileUtil extends Object
%{n} ⇒ replaced by current number of file
%{ext} ⇒ extension of the file without leading dot
%{date:PATTERN} ⇒ use date/time as pattern, where PATTERN is a valid DateTimeFormatter pattern
Every pattern has to specify exactly one %{n}-placeholder which will be replaced by the currentIllegalArgumentException.| Constructor and Description |
|---|
RollingFileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static File |
doFileRolling(File _fileToRollOver,
String _pattern,
int _maxFiles)
Do a rollover of the given source file using the provided pattern.
|
public static File doFileRolling(File _fileToRollOver, String _pattern, int _maxFiles) throws IOException
_fileToRollOver - file to roll over_pattern - pattern of the target file_maxFiles - maximum amount of files created before deletingIOException - if moving failsCopyright © 2019. All rights reserved.