- Sort Score
- Num 10 results
- Language All
Results 631 - 640 of 1,007 for readOp (0.04 seconds)
-
docs/zh-hant/docs/tutorial/request-files.md
* `write(data)`:將 `data` (`str` 或 `bytes`) 寫入檔案。 * `read(size)`:讀取檔案的 `size` (`int`) 個位元組/字元。 * `seek(offset)`:移動到檔案中的位元組位置 `offset` (`int`)。 * 例如,`await myfile.seek(0)` 會移到檔案開頭。 * 當你已經執行過 `await myfile.read()`,之後需要再次讀取內容時特別有用。 * `close()`:關閉檔案。 由於這些都是 `async` 方法,你需要以 await 呼叫它們。 例如,在 `async` 的路徑操作函式中可這樣讀取內容: ```Python contents = await myfile.read() ``` 若是在一般的 `def` 路徑操作函式中,你可以直接存取 `UploadFile.file`,例如:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 6.6K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
* If the client closes the connection while it is consuming the response body, attempts to peek * or read the trailers should throw. * * This test needs to make two interventions to prevent OkHttp from reading the entire response * body, which it will attempt to do otherwise: * * * Don't cache the response. The cache will try to read the entire response body so that it * can successfully complete the cache entry. *
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 18.8K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/ServerMessageBlockTest.java
@Test @DisplayName("Test read string with Unicode") void testReadStringUnicode() { testBlock.setUseUnicode(true); byte[] buffer = Strings.getUNIBytes("Test\0"); String result = testBlock.readString(buffer, 0); assertEquals("Test", result); } @Test @DisplayName("Test read string without Unicode")Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 36.2K bytes - Click Count (0) -
buildscripts/test-timeout.sh
echo "" echo "" } function send_put_object_request() { hdr_timeout=$1 body_timeout=$2 start=$(date +%s) timeout 5m bash -c "gen_put_request $hdr_timeout $body_timeout | netcat 127.0.0.1 $start_port | read" || return -1 [ $(($(date +%s) - start)) -gt $((srv_hdr_timeout + srv_idle_timeout + 1)) ] && return -1 return 0 } function test_minio_with_timeout() { start_port=$1 export MINIO_ROOT_USER=minio
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Mon Dec 02 13:21:17 GMT 2024 - 2.9K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/lease/DirectoryLeaseManagerTest.java
entry.updateChild("file1.txt", 1024L, 1000L, false, 0x20, 500L, 800L); entry.markComplete(); // Break lease with loss of read cache int newState = Smb2LeaseState.SMB2_LEASE_HANDLE_CACHING; // Lost read cache directoryLeaseManager.handleDirectoryLeaseBreak(leaseKey, newState); // Cache should be invalidated assertFalse(entry.isComplete());
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 23 01:47:47 GMT 2025 - 15.9K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/trans/TransTransactNamedPipeResponseTest.java
// First read response.readDataWireFormat(buffer1, 0, firstData.length); byte[] firstResult = new byte[firstData.length]; System.arraycopy(outputBuffer, 0, firstResult, 0, firstData.length); assertArrayEquals(firstData, firstResult); // Second read (should overwrite) response.readDataWireFormat(buffer2, 0, secondData.length);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 9.5K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/Trans2QueryPathInformationResponseTest.java
assertEquals(customLevel, infoLevel.getInt(resp)); } } @Nested @DisplayName("Wire Format Tests") class WireFormatTests { @Test @DisplayName("Should read parameters wire format") void testReadParametersWireFormat() { byte[] buffer = new byte[10]; int result = response.readParametersWireFormat(buffer, 0, 2); assertEquals(2, result);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 11.5K bytes - Click Count (0) -
internal/store/batch_test.go
} if key.ItemCount != int(limit) { t.Fatalf("expected key.ItemCount=%d; but got %v", limit, key.ItemCount) } items, err := store.GetMultiple(key) if err != nil { t.Fatalf("unable to read key %v; %v", key.String(), err) } if len(items) != int(limit) { t.Fatalf("expected len(items)=%d; but got %v", limit, len(items)) } } func TestBatchCommitOnExit(t *testing.T) { defer func() {
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 5.6K bytes - Click Count (0) -
docs/site-replication/run-ssec-object-replication.sh
chmod +x mc echo "done" fi export MC_HOST_minio1=https://minio:minio123@localhost:9001 export MC_HOST_minio2=https://minio:minio123@localhost:9002 ./mc ready minio1 --insecure ./mc ready minio2 --insecure # Prepare data for tests echo -n "Preparing test data ..." mkdir -p /tmp/data echo "Hello world" >/tmp/data/plainfile echo "Hello from encrypted world" >/tmp/data/encrypted
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Tue Sep 24 08:03:58 GMT 2024 - 9.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyTest.kt
assertThat(body.bytes()).isEqualTo(text) } } abstract class ForwardingSource( val delegate: Source, ) : Source { override fun read( sink: Buffer, byteCount: Long, ): Long = delegate.read(sink, byteCount) override fun timeout() = delegate.timeout() override fun close() = delegate.close()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 3.9K bytes - Click Count (0)