public class BackupUtil
extends java.lang.Object
| Constructor and Description |
|---|
BackupUtil()
Creates a new instance of BackupUtil
|
| Modifier and Type | Method and Description |
|---|---|
static void |
backupAllSubdirs(java.io.File dir,
int maxBackups)
Backups all found "layers" of subdirs.
|
static void |
backupContents(java.io.File dir,
int maxBackups)
backups all files in the directory.
|
static void |
backupDir(java.io.File file,
int maxBackups)
This method created to backup dirs.
|
static int |
backupFile(java.io.File file,
int maxBackups)
Performs backup of file.
|
static boolean |
checkForInteger(java.lang.String s) |
static boolean |
deleteDir(java.io.File dir) |
public static int backupFile(java.io.File file,
int maxBackups)
file - File to backupmaxBackups - Maximum number of allowed backupspublic static void backupDir(java.io.File file,
int maxBackups)
public static void backupAllSubdirs(java.io.File dir,
int maxBackups)
dir - root dir where layers situatedmaxBackups - max allowed time to backuppublic static void backupContents(java.io.File dir,
int maxBackups)
public static boolean checkForInteger(java.lang.String s)
s - Checks, if this String represents integer numberpublic static boolean deleteDir(java.io.File dir)
dir - File to delete. If it is not dir, deletes this File. Otherwise deletes dir
recursivelyCopyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.