Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ReadFile (0.22 sec)

  1. cmd/xl-storage.go

    // tries to verify whether the disk has bitrot.
    //
    // Additionally ReadFile also starts reading from an offset. ReadFile
    // semantics are same as io.ReadFull.
    func (s *xlStorage) ReadFile(ctx context.Context, volume string, path string, offset int64, buffer []byte, verifier *BitrotVerifier) (int64, error) {
    	if offset < 0 {
    		return 0, errInvalidArgument
    	}
    
    	volumeDir, err := s.getVolDir(volume)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  2. cmd/xl-storage_test.go

    		}
    	}
    
    	{
    		buf := make([]byte, 5)
    		// Test for negative offset.
    		if _, err = xlStorage.ReadFile(context.Background(), volume, "myobject", -1, buf, v); err == nil {
    			t.Fatalf("expected: error, got: <nil>")
    		}
    	}
    
    	for l := 0; l < 2; l++ {
    		// Following block validates all ReadFile test cases.
    		for i, testCase := range testCases {
    			var n int64
    			// Common read buffer.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 17:45:28 GMT 2024
    - 66.7K bytes
    - Viewed (0)
Back to top