test_class.declarator: folder = new TemporaryFolder()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public TemporaryFolder folder = new TemporaryFolder();
test_class.type: TemporaryFolder
test_class.var_name: folder
test_class.file: restx-common/src/test/java/restx/common/MoreFilesTest.java
test_class.identifier: MoreFilesTest
test_case.body: @Test
      public void should_extract_zip() throws Exception {
          File dest = folder.newFolder("dest");
  
          extractZip(new File("src/test/resources/restx/common/test.zip"), dest);
  
          assertThat(new File(dest, "A.txt")).exists();
          assertThat(new File(dest, "1/B.txt")).exists();
          assertThat(new File(dest, "1/C.txt")).exists();
          assertThat(new File(dest, "2/D.txt")).exists();
          assertThat(new File(dest, "2/E.txt")).exists().hasContent("hello");
      }
test_case.class_method_signature: MoreFilesTest.should_extract_zip()
test_case.full_signature: @Test public void should_extract_zip()
test_case.identifier: should_extract_zip
test_case.invocations: newFolder extractZip exists assertThat exists assertThat exists assertThat exists assertThat hasContent exists assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_extract_zip()
focal_class.declarator: pathToFile = new Function<Path, File>() {
          @Override
          public File apply(Path input) {
              return input.toFile();
          }
      }
focal_class.modifier: public static final
focal_class.original_string: public static final Function<? super Path, ? extends File> pathToFile = new Function<Path, File>() {
          @Override
          public File apply(Path input) {
              return input.toFile();
          }
      };
focal_class.type: Function<? super Path, ? extends File>
focal_class.var_name: pathToFile
focal_class.declarator: strToPath = new Function<String, Path>() {
          @Override
          public Path apply(String input) {
              return FileSystems.getDefault().getPath(input);
          }
      }
focal_class.modifier: public static final
focal_class.original_string: public static final Function<String, Path> strToPath = new Function<String, Path>() {
          @Override
          public Path apply(String input) {
              return FileSystems.getDefault().getPath(input);
          }
      };
focal_class.type: Function<String, Path>
focal_class.var_name: strToPath
focal_class.file: restx-common/src/main/java/restx/common/MoreFiles.java
focal_class.identifier: MoreFiles
focal_class.class_method_signature: MoreFiles.delete(Path path)
focal_class.full_signature: public static void delete(Path path)
focal_class.identifier: delete
focal_class.modifiers: public static
focal_class.parameters: (Path path)
focal_class.return: void
focal_class.signature: void delete(Path path)
focal_class.class_method_signature: MoreFiles.watch(Path dir, EventBus eventBus,
                               ExecutorService executor, WatcherSettings watcherSettings)
focal_class.full_signature: public static Closeable watch(Path dir, EventBus eventBus,
                               ExecutorService executor, WatcherSettings watcherSettings)
focal_class.identifier: watch
focal_class.modifiers: public static
focal_class.parameters: (Path dir, EventBus eventBus,
                               ExecutorService executor, WatcherSettings watcherSettings)
focal_class.return: Closeable
focal_class.signature: Closeable watch(Path dir, EventBus eventBus,
                               ExecutorService executor, WatcherSettings watcherSettings)
focal_class.class_method_signature: MoreFiles.copyDir(final Path sourceDir, final Path targetDir)
focal_class.full_signature: public static void copyDir(final Path sourceDir, final Path targetDir)
focal_class.identifier: copyDir
focal_class.modifiers: public static
focal_class.parameters: (final Path sourceDir, final Path targetDir)
focal_class.return: void
focal_class.signature: void copyDir(final Path sourceDir, final Path targetDir)
focal_class.class_method_signature: MoreFiles.checkFileExists(String location)
focal_class.full_signature: public static void checkFileExists(String location)
focal_class.identifier: checkFileExists
focal_class.modifiers: public static
focal_class.parameters: (String location)
focal_class.return: void
focal_class.signature: void checkFileExists(String location)
focal_class.class_method_signature: MoreFiles.extractZip(File zip, File toDir)
focal_class.full_signature: public static void extractZip(File zip, File toDir)
focal_class.identifier: extractZip
focal_class.modifiers: public static
focal_class.parameters: (File zip, File toDir)
focal_class.return: void
focal_class.signature: void extractZip(File zip, File toDir)
focal_class.class_method_signature: MoreFiles.removeWindowsCarriageReturnsBeforeLF(String str)
focal_class.full_signature: public static String removeWindowsCarriageReturnsBeforeLF(String str)
focal_class.identifier: removeWindowsCarriageReturnsBeforeLF
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String removeWindowsCarriageReturnsBeforeLF(String str)
focal_method.body: public static void extractZip(File zip, File toDir) throws IOException {
          try (ZipInputStream zis = new ZipInputStream(new FileInputStream(zip))) {
              ZipEntry entry;
              while ((entry = zis.getNextEntry()) != null) {
                  if (!entry.isDirectory()) {
                      File file = new File(toDir, entry.getName());
                      createParentDirs(file);
                      Files.copy(zis, file.toPath());
                      zis.closeEntry();
                  }
              }
          }
      }
focal_method.class_method_signature: MoreFiles.extractZip(File zip, File toDir)
focal_method.full_signature: public static void extractZip(File zip, File toDir)
focal_method.identifier: extractZip
focal_method.invocations: getNextEntry isDirectory getName createParentDirs copy toPath closeEntry
focal_method.modifiers: public static
focal_method.parameters: (File zip, File toDir)
focal_method.return: void
focal_method.signature: void extractZip(File zip, File toDir)