Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for directoryToResponse (0.08 seconds)

  1. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        try {
          if (!path.startsWith("/") || path.contains("..")) throw new FileNotFoundException();
    
          File file = new File(root + path);
          return file.isDirectory()
              ? directoryToResponse(path, file)
              : fileToResponse(path, file);
        } catch (FileNotFoundException e) {
          return new MockResponse()
              .setStatus("HTTP/1.1 404")
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 11 02:37:00 GMT 2026
    - 5.3K bytes
    - Click Count (0)
Back to Top