Заголовок с истекшим сроком действия не отправлен, содержимое кэшировано. Как долго браузер выполняет условный запрос GET?

Для Java 7+ существует также https://docs.oracle.com/javase/7/docs/api/java/nio/file/DirectoryStream.html

Пример, взятый из Javadoc:

List listSourceFiles(Path dir) throws IOException {
   List result = new ArrayList<>();
   try (DirectoryStream stream = Files.newDirectoryStream(dir, "*.{c,h,cpp,hpp,java}")) {
       for (Path entry: stream) {
           result.add(entry);
       }
   } catch (DirectoryIteratorException ex) {
       // I/O error encounted during the iteration, the cause is an IOException
       throw ex.getCause();
   }
   return result;
}

30
задан BartoszKP 23 January 2014 в 20:48
поделиться