Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 247 for Read (0.16 sec)

  1. internal/ioutil/read_file.go

    )
    
    // ReadFileWithFileInfo reads the named file and returns the contents.
    // A successful call returns err == nil, not err == EOF.
    // Because ReadFile reads the whole file, it does not treat an EOF from Read
    // as an error to be reported.
    func ReadFileWithFileInfo(name string) ([]byte, fs.FileInfo, error) {
    	f, err := OsOpenFile(name, readMode, 0o666)
    	if err != nil {
    		return nil, nil, err
    	}
    	defer f.Close()
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 09 18:17:51 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  2. internal/ioutil/read_file_noatime_supported.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package ioutil
    
    import (
    	"os"
    )
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 937 bytes
    - Viewed (0)
  3. internal/ioutil/read_file_noatime_notsupported.go

    Harshavardhana <******@****.***> 1629336922 -0700
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 893 bytes
    - Viewed (0)
  4. src/bytes/buffer.go

    }
    
    var errUnreadByte = errors.New("bytes.Buffer: UnreadByte: previous operation was not a successful read")
    
    // UnreadByte unreads the last byte returned by the most recent successful
    // read operation that read at least one byte. If a write has happened since
    // the last read, if the last read returned an error, or if the read read zero
    // bytes, UnreadByte returns an error.
    func (b *Buffer) UnreadByte() error {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  5. internal/http/request-recorder.go

    	buf bytes.Buffer
    	// total bytes read including header size
    	bytesRead int
    }
    
    // Close is a no operation closer
    func (r *RequestRecorder) Close() error {
    	// no-op
    	return nil
    }
    
    // Read reads from the internal reader and counts/save the body in the memory
    func (r *RequestRecorder) Read(p []byte) (n int, err error) {
    	n, err = r.Reader.Read(p)
    	r.bytesRead += n
    
    	if r.LogBody {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 12 21:37:19 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  6. internal/deadlineconn/deadlineconn_test.go

    		defer deadlineconn.Close()
    
    		// Read a line
    		b := make([]byte, 12)
    		_, terr = deadlineconn.Read(b)
    		if terr != nil {
    			t.Errorf("failed to read from client. %v", terr)
    			return
    		}
    		received := string(b)
    		if received != "message one\n" {
    			t.Errorf(`server: expected: "message one\n", got: %v`, received)
    			return
    		}
    
    		// Wait for more than read timeout to simulate processing.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Nov 05 18:09:21 GMT 2022
    - 3K bytes
    - Viewed (0)
  7. internal/dsync/dsync-server_test.go

    		return false, fmt.Errorf("RUnlock attempted on a write locked entity: %s", args.Resources[0])
    	}
    	if locksHeld > ReadLock {
    		l.lockMap[args.Resources[0]] = locksHeld - ReadLock // Remove one of the read locks held
    	} else {
    		delete(l.lockMap, args.Resources[0]) // Remove the (last) read lock
    	}
    	return reply, nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  8. internal/lsync/lrwmutex.go

    }
    
    // RLock holds a read lock on lm.
    //
    // If one or more read lock are already in use, it will grant another lock.
    // Otherwise the calling go routine blocks until the mutex is available.
    func (lm *LRWMutex) RLock() {
    	const isWriteLock = false
    	lm.lockLoop(context.Background(), lm.id, lm.source, 1<<63-1, isWriteLock)
    }
    
    // GetRLock tries to get a read lock on lm before the timeout occurs.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  9. cmd/streaming-signature-v4.go

    var errChunkTooBig = errors.New("chunk too big: choose chunk size <= 16MiB")
    
    // newSignV4ChunkedReader returns a new s3ChunkedReader that translates the data read from r
    // out of HTTP "chunked" format before returning it.
    // The s3ChunkedReader returns io.EOF when the final 0-length chunk is read.
    //
    // NewChunkedReader is not needed by normal applications. The http package
    // automatically decodes chunking when reading response bodies.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  10. src/bufio/bufio.go

    			return n - remain, b.readErr()
    		}
    	}
    }
    
    // Read reads data into p.
    // It returns the number of bytes read into p.
    // The bytes are taken from at most one Read on the underlying [Reader],
    // hence n may be less than len(p).
    // To read exactly len(p) bytes, use io.ReadFull(b, p).
    // If the underlying [Reader] can return a non-zero count with io.EOF,
    // then this Read method can do so as well; see the [io.Reader] docs.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
Back to top