Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for isDirectory (0.2 sec)

  1. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

      val request = Request("https://publicsuffix.org/list/public_suffix_list.dat".toHttpUrl())
    
      suspend fun import() {
        check(fileSystem.metadata(resources).isDirectory)
        check(fileSystem.metadata(testResources).isDirectory)
    
        updateLocalFile()
    
        val importResults = readImportResults()
    
        writeOutputFile(importResults)
      }
    
      private suspend fun updateLocalFile() =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  2. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        String path = request.getPath();
        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")
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  3. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

            }
            i++
          }
          if (path == null) {
            // TODO: send bad request error
            throw AssertionError()
          }
          val file = File(baseDirectory.toString() + path)
          if (file.isDirectory) {
            serveDirectory(stream, file.listFiles()!!)
          } else if (file.exists()) {
            serveFile(stream, file)
          } else {
            send404(stream, path)
          }
        } catch (e: IOException) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

      val files =
        try {
          list(directory)
        } catch (fnfe: FileNotFoundException) {
          return
        }
      for (file in files) {
        try {
          if (metadata(file).isDirectory) {
            deleteContents(file)
          }
    
          delete(file)
        } catch (ioe: IOException) {
          if (exception == null) {
            exception = ioe
          }
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
Back to top