public class RollingBackupFile extends File
pathSeparator, pathSeparatorChar, separator, separatorChar
Constructor and Description |
---|
RollingBackupFile(File file,
int nBackupp) |
RollingBackupFile(String pathname,
int nBackupp) |
Modifier and Type | Method and Description |
---|---|
void |
clearAll()
remove all files, including main file
|
File |
getNewFile() |
File |
getNewFile(String extension)
get a new file for a given extension
|
File |
getOldFile(int i) |
void |
setWantExtension(boolean wantExtension) |
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
public RollingBackupFile(String pathname, int nBackupp)
pathname
- the base filenamenBackupp
- the number of backups to retainpublic RollingBackupFile(File file, int nBackupp)
file
- the base filenBackupp
- the number of backups to retainpublic void setWantExtension(boolean wantExtension)
wantExtension
- the wantExtension to setpublic File getNewFile()
public File getNewFile(String extension)
extension
- public File getOldFile(int i)
i
- the index of the file to readpublic void clearAll()
Copyright © 2018. All rights reserved.