ExportFile implements ExportTable { public final void rescan() throws IOException { try { _exports = parse(_exportFileProvider.call()); } catch (Exception e) { throwIfInstanceOf(e, IOException.class); throwIfUnchecked(e); throw new RuntimeException("Unhandled exception", e); } } ExportFile(File file);  ExportFile(File file, File dir);  ExportFile(URI uri);  ExportFile(Reader reader); @Override Stream<FsExport> exports(); @Override FsExport getExport(String path, InetAddress client); @Override FsExport getExport(int index, InetAddress client); @Override Stream<FsExport> exports(InetAddress client); final void rescan();  }
@Test public void testAddingNewFile() throws IOException { ExportFile ef = new ExportFile(export, exportDir); assertExportNotExists("/added_export", ef); File addedFile = File.createTempFile("new_export", ".exports", exportDir); addedFile.deleteOnExit(); Files.asCharSink(addedFile, UTF_8).write("/added_export *(sec=sys)"); ef.rescan(); assertExportExists("/added_export", ef); }