Code example for ZipFile

Methods: getName

0
 
		return null; 
	} 
 
	public static boolean isZipInCache (Context context, ZipFile zip) {
		String shortName = zip.getName().replaceAll(".*/", "");
		File cacheDir = getCacheDir(context);
		File zipDir = new File(cacheDir, shortName);
		return zipDir.exists();
	} 
 
	public synchronized static void prune (Context context) {
		File cacheDir = getCacheDir(context);
		File[] list = cacheDir.listFiles();
		Arrays.sort(list, new LastModifiedFileComparator());
		for (int i = 0; i < list.length; i++) {
			File file = list[i];
			if (i < list.length - MAXFILES) {
				deleteDiretory(file);
			} 
		}