@Test public void testFileManager() throws IOException { FileManager fm = new FileManager(tmp.getRoot()); OutputStream out = fm.create("tmp/boo", "foo.bar"); out.write(("Test\n" + "More\n").getBytes(UTF_8)); fm.finalize(out); File file = new File(tmp.getRoot(), "tmp/boo/foo.bar"); try (FileInputStream in = new FileInputStream(file)) { assertThat(readString(in), is("Test\n" + "More\n")); } }
public FileManager(File root) { this.root = root; generatedFiles = new HashSet<>(); }
FileManager { public FileManager(File root) { this.root = root; generatedFiles = new HashSet<>(); } }
FileManager { public FileManager(File root) { this.root = root; generatedFiles = new HashSet<>(); } FileManager(File root); }
FileManager { public FileManager(File root) { this.root = root; generatedFiles = new HashSet<>(); } FileManager(File root); OutputStream create(String path, String name); void finalize(OutputStream stream); }
FileManager { public FileManager(File root) { this.root = root; generatedFiles = new HashSet<>(); } FileManager(File root); OutputStream create(String path, String name); void finalize(OutputStream stream);  }