/** * Get the inactive history directories. * * @return the inactive history */ public List<File> getInactiveHistory() throws PatchingException { if (validHistory == null) { walk(); } final File[] inactiveDirs = installedIdentity.getInstalledImage().getPatchesDir().listFiles(new FileFilter() { @Override public boolean accept(File pathname) { return pathname.isDirectory() && !validHistory.contains(pathname.getName()); } }); return inactiveDirs == null ? Collections.<File>emptyList() : Arrays.asList(inactiveDirs); }
/** * Get the inactive history directories. * * @return the inactive history */ public List<File> getInactiveHistory() throws PatchingException { if (validHistory == null) { walk(); } final File[] inactiveDirs = installedIdentity.getInstalledImage().getPatchesDir().listFiles(new FileFilter() { @Override public boolean accept(File pathname) { return pathname.isDirectory() && !validHistory.contains(pathname.getName()); } }); return inactiveDirs == null ? Collections.<File>emptyList() : Arrays.asList(inactiveDirs); }
/** * Get the inactive overlay directories. * * @return the inactive overlay directories */ public List<File> getInactiveOverlays() throws PatchingException { if (referencedOverlayDirectories == null) { walk(); } List<File> inactiveDirs = null; for (Layer layer : installedIdentity.getLayers()) { final File overlaysDir = new File(layer.getDirectoryStructure().getModuleRoot(), Constants.OVERLAYS); final File[] inactiveLayerDirs = overlaysDir.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { return pathname.isDirectory() && !referencedOverlayDirectories.contains(pathname); } }); if (inactiveLayerDirs != null && inactiveLayerDirs.length > 0) { if (inactiveDirs == null) { inactiveDirs = new ArrayList<File>(); } inactiveDirs.addAll(Arrays.asList(inactiveLayerDirs)); } } return inactiveDirs == null ? Collections.<File>emptyList() : inactiveDirs; }
/** * Get the inactive overlay directories. * * @return the inactive overlay directories */ public List<File> getInactiveOverlays() throws PatchingException { if (referencedOverlayDirectories == null) { walk(); } List<File> inactiveDirs = null; for (Layer layer : installedIdentity.getLayers()) { final File overlaysDir = new File(layer.getDirectoryStructure().getModuleRoot(), Constants.OVERLAYS); final File[] inactiveLayerDirs = overlaysDir.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { return pathname.isDirectory() && !referencedOverlayDirectories.contains(pathname); } }); if (inactiveLayerDirs != null && inactiveLayerDirs.length > 0) { if (inactiveDirs == null) { inactiveDirs = new ArrayList<File>(); } inactiveDirs.addAll(Arrays.asList(inactiveLayerDirs)); } } return inactiveDirs == null ? Collections.<File>emptyList() : inactiveDirs; }