public static boolean copyToDest() { String origProfile = sTempProfilePath; String destProfile = sDestProfilePath; String origImg = sTempImgPath; String destImg = sDestImgPath; try { File destProfileDir = new File(destProfile); if (destProfileDir.exists()) destProfileDir.delete(); Utils.copyDirectiory(origProfile, destProfile); File destImgDir = new File(destImg); if (destImgDir.exists()) destImgDir.delete(); Utils.copyDirectiory(origImg, destImg); Utils.deleteDirectory(sTempExtPath); return true; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } }
public static boolean unzip() { String zipPath = sTempFile; File zipFile = new File(zipPath); if (!zipFile.exists()) return false; String destPath = sTempExtPath; File destPathDir = new File(destPath); if (destPathDir.exists()) Utils.deleteDirectory(destPath); try { ZipUtils.upZipFile(zipFile, destPath); return true; } catch (ZipException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } }