List of utility methods to do File Backup
void | backup(String strFileName, int iMaxSize) backup final java.text.SimpleDateFormat fmt = new java.text.SimpleDateFormat( "yyyyMMddHHmmss"); File flSource = new File(strFileName); if (flSource.length() > iMaxSize) { String strNewName = ""; if (strFileName.indexOf(".") >= 0) strNewName = strFileName.substring(0, strFileName.lastIndexOf(".")) ... |
void | backup(String strFileName, int iMaxSize, int iRemainSize) backup if (iMaxSize <= iRemainSize) throw new IllegalArgumentException(); final java.text.SimpleDateFormat fmt = new java.text.SimpleDateFormat( "yyyyMMddHHmmss"); File flSource = new File(strFileName); if (flSource.length() > iMaxSize) { String strNewName = strFileName + "." + fmt.format(new java.util.Date()); ... |