@Test public void recursiveCopyMergeFailed() throws Exception { MockFileOp fop = new MockFileOp(); File s1 = new File("/root/src/a"); File s2 = new File("/root/src/foo/a"); File d1 = new File("/root/dest/a/b"); fop.recordExistingFile(s1.getPath(), "content1"); fop.recordExistingFile(s2.getPath(), "content2"); fop.recordExistingFile(d1.getPath(), "content3"); try { FileOpUtils.recursiveCopy(new File("/root/src/"), new File("/root/dest"), true, fop, new FakeProgressIndicator()); fail(); } catch (IOException expected) { } assertEquals("content1", new String(fop.getContent(s1))); assertEquals("content2", new String(fop.getContent(s2))); assertEquals("content3", new String(fop.getContent(d1))); assertEquals(3, fop.getExistingFiles().length); }
public static void recursiveCopy(@NonNull File src, @NonNull File dest, @NonNull FileOp fop, @NonNull ProgressIndicator progress) throws IOException { recursiveCopy(src, dest, false, fop, progress); }
FileOpUtils { public static void recursiveCopy(@NonNull File src, @NonNull File dest, @NonNull FileOp fop, @NonNull ProgressIndicator progress) throws IOException { recursiveCopy(src, dest, false, fop, progress); } }
FileOpUtils { public static void recursiveCopy(@NonNull File src, @NonNull File dest, @NonNull FileOp fop, @NonNull ProgressIndicator progress) throws IOException { recursiveCopy(src, dest, false, fop, progress); } private  FileOpUtils(); }
FileOpUtils { public static void recursiveCopy(@NonNull File src, @NonNull File dest, @NonNull FileOp fop, @NonNull ProgressIndicator progress) throws IOException { recursiveCopy(src, dest, false, fop, progress); } private  FileOpUtils(); @NonNull static FileOp create(); static void recursiveCopy(@NonNull File src, @NonNull File dest, @NonNull FileOp fop,
            @NonNull ProgressIndicator progress); static void safeRecursiveOverwrite(@NonNull File src, @NonNull File dest,
            @NonNull FileOp fop, @NonNull ProgressIndicator progress); @Nullable static File getNewTempDir(@NonNull String base, @NonNull FileOp fileOp); @NonNull @VisibleForTesting static File getTempDir(@NonNull String base, int i); @NonNull static File append(@NonNull File base, @NonNull String... segments); @NonNull static File append(@NonNull String base, @NonNull String... segments); @NonNull static String makeRelative(@NonNull File baseDir, @NonNull File toBeRelative, FileOp fop); static void retainTempDirs(Set<File> retain, String base, FileOp mFop); }
FileOpUtils { public static void recursiveCopy(@NonNull File src, @NonNull File dest, @NonNull FileOp fop, @NonNull ProgressIndicator progress) throws IOException { recursiveCopy(src, dest, false, fop, progress); } private  FileOpUtils(); @NonNull static FileOp create(); static void recursiveCopy(@NonNull File src, @NonNull File dest, @NonNull FileOp fop,
            @NonNull ProgressIndicator progress); static void safeRecursiveOverwrite(@NonNull File src, @NonNull File dest,
            @NonNull FileOp fop, @NonNull ProgressIndicator progress); @Nullable static File getNewTempDir(@NonNull String base, @NonNull FileOp fileOp); @NonNull @VisibleForTesting static File getTempDir(@NonNull String base, int i); @NonNull static File append(@NonNull File base, @NonNull String... segments); @NonNull static File append(@NonNull String base, @NonNull String... segments); @NonNull static String makeRelative(@NonNull File baseDir, @NonNull File toBeRelative, FileOp fop); static void retainTempDirs(Set<File> retain, String base, FileOp mFop);  }