| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static Path | |
| public static List | getExistingBackupFiles(Path targetFile, Path backupDir)
Lists the existing backups of the given library, oldest first. |
| public static Path | getPathForNewBackupFileAndCreateDirectory(Path targetFile, BackupFileType fileType, Path backupDir)
Determines the path of a new backup file (using the given extension) The file is named |
| public static Optional | getPathOfLatestExistingBackupFile(Path targetFile, Path backupDir)
Determines the most recent existing backup of the given library, see |
| public static String |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| BackupFileUtil | back to summary |
|---|---|
| private BackupFileUtil() | |
| getDirectoryOfLibrary | back to summary |
|---|---|
| private static Path getDirectoryOfLibrary(Path targetFile) | |
| getExistingBackupFiles | back to summary |
|---|---|
| public static List Lists the existing backups of the given library, oldest first. Name order is time order, because of the timestamp in the file name. In case there is no backup directory, the directory of the library is searched,
because that is where | |
| getPathForNewBackupFileAndCreateDirectory | back to summary |
|---|---|
| public static Path getPathForNewBackupFileAndCreateDirectory(Path targetFile, BackupFileType fileType, Path backupDir) Determines the path of a new backup file (using the given extension) The file is named SIDE EFFECT: Creates the directory. In case that fails, the backup is placed next to the library — still with the same name pattern, so it can never collide with (and overwrite) the library file itself. Note that this backup is different from the | |
| getPathOfLatestExistingBackupFile | back to summary |
|---|---|
| public static Optional Determines the most recent existing backup of the given library, see | |
| getUniqueFilePrefix | back to summary |
|---|---|
| public static String getUniqueFilePrefix(Path targetFile) Determines a unique file prefix. When creating a backup file, the backup file should belong to the original file. Just adding a suffix to the filename, does not work in all cases: It may be possible that the user has opened "paper.bib" twice. Thus, we need to create a unique prefix to distinguish these files. | |