Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for exists (0.23 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

        this.assertThreadHoldsLock()
    
        if (initialized) {
          return // Already initialized.
        }
    
        // If a bkp file exists, use it instead.
        if (fileSystem.exists(journalFileBackup)) {
          // If journal file also exists just delete backup file.
          if (fileSystem.exists(journalFile)) {
            fileSystem.delete(journalFileBackup)
          } else {
            fileSystem.atomicMove(journalFileBackup, journalFile)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

       *     Corresponds to `FLAG_FIN`.
       * @param flushHeaders true to force flush the response headers. This should be true unless the
       *     response body exists and will be written immediately.
       */
      @Throws(IOException::class)
      fun writeHeaders(
        responseHeaders: List<Header>,
        outFinished: Boolean,
        flushHeaders: Boolean,
      ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        return connect
      }
    
      /**
       * Returns the connection already attached to the call if it's eligible for a new exchange.
       *
       * If the call's connection exists and is eligible for another exchange, it is returned. If it
       * exists but cannot be used for another exchange, it is closed and this returns null.
       */
      private fun planReuseCallConnection(): ReusePlan? {
        // This may be mutated by releaseConnectionNoEvents()!
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    internal fun EventListener.asFactory() = EventListener.Factory { this }
    
    /**
     * Reads until this is exhausted or the deadline has been reached. This is careful to not extend the
     * deadline if one exists already.
     */
    @Throws(IOException::class)
    internal fun Source.skipAll(
      duration: Int,
      timeUnit: TimeUnit,
    ): Boolean {
      val nowNs = System.nanoTime()
      val originalDurationNs =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Cache.kt

       * will not be returned. If existing responses are evicted during iteration, they will be absent
       * (unless they were already returned).
       *
       * The iterator supports [MutableIterator.remove]. Removing a URL from the iterator evicts the
       * corresponding response from the cache. Use this to evict selected responses.
       */
      @Throws(IOException::class)
      fun urls(): MutableIterator<String> {
        return object : MutableIterator<String> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        assertThat(pool.closeConnections(149L)).isEqualTo(1L)
        assertThat(pool.connectionCount()).isEqualTo(1)
        assertThat(c1.socket().isClosed).isFalse()
    
        // Running at time 150, the pool evicts.
        assertThat(pool.closeConnections(150L)).isEqualTo(0)
        assertThat(pool.connectionCount()).isEqualTo(0)
        assertThat(c1.socket().isClosed).isTrue()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

     * @param file a file in the directory to check. This file shouldn't already exist!
     */
    internal fun FileSystem.isCivilized(file: Path): Boolean {
      sink(file).use {
        try {
          delete(file)
          return true
        } catch (_: IOException) {
        }
      }
      delete(file)
      return false
    }
    
    /** Delete file we expect but don't require to exist. */
    internal fun FileSystem.deleteIfExists(path: Path) {
      try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
Back to top