public static List<String> readRefs(final Properties properties) { return readRefs(properties, Constants.PATCHES); }
public static List<String> readRefs(final Properties properties) { return readRefs(properties, Constants.PATCHES); }
static void loadOverlays(final File layeringRoot, final List<File> path) { final File overlays = new File(layeringRoot, Constants.OVERLAYS); if (overlays.exists()) { final File refs = new File(overlays, Constants.OVERLAYS); if (refs.exists()) { try { for (final String overlay : PatchUtils.readRefs(refs)) { final File root = new File(overlays, overlay); path.add(root); } } catch (IOException e) { throw new RuntimeException(e); } } } path.add(layeringRoot); }
public static List<String> readRefs(final File file) throws IOException { if(! file.exists()) { return Collections.emptyList(); } final InputStream is = new FileInputStream(file); try { return readRefs(is); } finally { safeClose(is); } }
public static List<String> readRefs(final File file) throws IOException { if(! file.exists()) { return Collections.emptyList(); } final InputStream is = new FileInputStream(file); try { return readRefs(is); } finally { safeClose(is); } }
static void loadOverlays(final File layeringRoot, final List<File> path) { final File overlays = new File(layeringRoot, Constants.OVERLAYS); if (overlays.exists()) { final File refs = new File(overlays, Constants.OVERLAYS); if (refs.exists()) { try { for (final String overlay : PatchUtils.readRefs(refs)) { final File root = new File(overlays, overlay); path.add(root); } } catch (IOException e) { throw new RuntimeException(e); } } } path.add(layeringRoot); }
public void renameFiles() throws IOException { List<String> failures = PatchUtils.readRefs(renamingFailureMarker); for(String path : failures) { File toBeRenamed = new File(path); if(toBeRenamed.exists()) { if(!toBeRenamed.renameTo(PatchUtils.getRenamedFileName(toBeRenamed))) { log.cannotDeleteFile(path); } } } renamingFailureMarker.delete(); } }
public void renameFiles() throws IOException { List<String> failures = PatchUtils.readRefs(renamingFailureMarker); for(String path : failures) { File toBeRenamed = new File(path); if(toBeRenamed.exists()) { if(!toBeRenamed.renameTo(PatchUtils.getRenamedFileName(toBeRenamed))) { log.cannotDeleteFile(path); } } } renamingFailureMarker.delete(); } }
public static TargetInfo loadTargetInfo(final Properties properties, final DirectoryStructure structure) { final String ref = PatchUtils.readRef(properties, Constants.CUMULATIVE); final List<String> patches = PatchUtils.readRefs(properties); return new TargetInfoImpl(properties, ref, patches, structure); }
public static TargetInfo loadTargetInfo(final Properties properties, final DirectoryStructure structure) { final String ref = PatchUtils.readRef(properties, Constants.CUMULATIVE); final List<String> patches = PatchUtils.readRefs(properties); return new TargetInfoImpl(properties, ref, patches, structure); }
final File failures = new File(new File(installation, ".installation"), "cleanup-renaming-files"); assertThat(failures.exists(), is(true)); List<String> failedRenaming = PatchUtils.readRefs(failures); assertThat(failedRenaming.size(), is(1)); assertThat(failedRenaming.get(0), is(resource.getAbsolutePath()));
final List<String> allPatches = PatchUtils.readRefs(properties, Constants.ALL_PATCHES);
final List<String> allPatches = PatchUtils.readRefs(properties, Constants.ALL_PATCHES);