Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for directoryToResponse (0.07 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 Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Click Count (0)
Back to Top