- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 33 for ReadFull (0.12 sec)
-
cmd/storage-rest-server.go
if !s.IsValid(w, r) { return } volume := r.Form.Get(storageRESTVolume) filePath := r.Form.Get(storageRESTFilePath) buf := make([]byte, r.ContentLength) _, err := io.ReadFull(r.Body, buf) if err != nil { s.writeErrorResponse(w, err) return } err = s.getStorage().AppendFile(r.Context(), volume, filePath, buf) if err != nil { s.writeErrorResponse(w, err) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 45.7K bytes - Viewed (0) -
cmd/metacache-stream.go
sz, err := r.mr.ReadStringHeader() if err != nil { r.err = err return err } if cap(tmp) < int(sz) { tmp = make([]byte, 0, sz+256) } tmp = tmp[:sz] _, err = r.mr.R.ReadFull(tmp) if err != nil { r.err = err return err } if string(tmp) >= s { r.current.name = string(tmp) r.current.metadata, r.err = r.mr.ReadBytes(nil) return r.err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 19.5K bytes - Viewed (0) -
internal/ioutil/ioutil.go
var written int64 for { buf := alignedBuf if totalSize > 0 { remaining := totalSize - written if remaining < int64(len(buf)) { buf = buf[:remaining] } } nr, err := io.ReadFull(r, buf) eof := errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) if err != nil && !eof { return written, err } buf = buf[:nr] var ( n int un int nw int64
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 10.9K bytes - Viewed (0) -
cmd/storage-rest-client.go
values.Set(storageRESTBitrotHash, "") } respBody, err := client.callGet(ctx, storageRESTMethodReadFile, values, nil, -1) if err != nil { return 0, err } defer xhttp.DrainBody(respBody) n, err := io.ReadFull(respBody, buf) return int64(n), toStorageErr(err) } // ListDir - lists a directory.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:07:21 UTC 2024 - 30.2K bytes - Viewed (0) -
cmd/erasure-decode_test.go
if err != nil { t.Fatalf("Test %d: failed to create ErasureStorage: %v", i, err) } disks := setup.disks data := make([]byte, test.data) if _, err = io.ReadFull(crand.Reader, data); err != nil { t.Fatalf("Test %d: failed to generate random test data: %v", i, err) } writeAlgorithm := test.algorithm if !test.algorithm.Available() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 21.1K bytes - Viewed (0) -
cmd/xl-storage-format-v2.go
hasFull := true if initial > metaDataReadDefault { initial = metaDataReadDefault hasFull = false } buf := metaDataPoolGet()[:initial] _, err := io.ReadFull(r, buf) if err != nil { return nil, fmt.Errorf("readXLMetaNoData(io.ReadFull): %w", err) } readMore := func(n int64) error { has := int64(len(buf)) if has >= n { return nil } if hasFull || n > size {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 64K bytes - Viewed (1) -
cmd/xl-storage.go
sz := stat.Size() if sz <= metaDataReadDefault { buf = metaDataPoolGet() buf = buf[:sz] } else { buf = make([]byte, sz) } // Read file... _, err = io.ReadFull(f, buf) return buf, stat.ModTime().UTC(), osErrToFileErr(err) } // ReadAll is a raw call, reads content at any path and returns the buffer.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 91.3K bytes - Viewed (0) -
src/bufio/bufio.go
// 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. func (b *Reader) Read(p []byte) (n int, err error) { n = len(p)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer_test.go
err = rb.WriteByte(0) done <- err _, err = rb.TryWrite([]byte("world")) done <- err err = rb.TryWriteByte(0) done <- err }() buf := make([]byte, 100) n, err := io.ReadFull(rb, buf) if err != nil && err != io.ErrUnexpectedEOF { t.Fatalf("got: %q; want: %q", err, io.ErrUnexpectedEOF) } for writeErr := range done { if writeErr != ErrWriteOnClosed {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 26.8K bytes - Viewed (0) -
cmd/encryption-v1.go
if int64(len(p)) < unreadPartLen { n1, err = d.decrypter.Read(p) if err != nil { return 0, err } d.partDecRelOffset += int64(n1) } else { n1, err = io.ReadFull(d.decrypter, p[:unreadPartLen]) if err != nil { return 0, err } // We should now proceed to next part, reset all // values appropriately. d.partEncRelOffset = 0 d.partDecRelOffset = 0
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:06:08 UTC 2024 - 37.2K bytes - Viewed (0)