Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 200 for Read (0.24 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. cmd/tier-journal.go

    		return nil
    	}
    
    	return errors.New("no local drive found")
    }
    
    // rotate rotates the journal. If a read-only journal already exists it does
    // nothing. Otherwise renames the active journal to a read-only journal and
    // opens a new active journal.
    func (jd *tierDiskJournal) rotate() error {
    	// Do nothing if a read-only journal file already exists.
    	if _, err := os.Stat(jd.ReadOnlyPath()); err == nil {
    		return nil
    	}
    Go
    - Registered: Sun Feb 25 19:28:16 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/compare/comparator_test.go

    func TestComparatorMismatchedConfigs(t *testing.T) {
    	cfg, err := os.ReadFile("testdata/configdump.json")
    	if err != nil {
    		t.Fatalf("Failed to read test data: %v", err)
    	}
    	diffCfg, err := os.ReadFile("testdata/configdump_diff.json")
    	if err != nil {
    		t.Fatalf("Failed to read test data: %v", err)
    	}
    
    	var outputBuffer bytes.Buffer
    	comparator, err := NewComparator(&outputBuffer, map[string][]byte{"default": cfg}, diffCfg)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Mar 12 10:02:09 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  4. internal/bucket/bandwidth/reader.go

    type MonitorReaderOptions struct {
    	BucketOptions
    	HeaderSize int
    }
    
    // Read implements a throttled read
    func (r *MonitoredReader) Read(buf []byte) (n int, err error) {
    	if r.throttle == nil {
    		return r.r.Read(buf)
    	}
    	if r.lastErr != nil {
    		err = r.lastErr
    		return
    	}
    	b := r.throttle.Burst()  // maximum available tokens
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  5. 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)
  6. cmd/erasure-common.go

    	}
    
    	ignoredErrs := []error{
    		errFileNotFound,
    		errVolumeNotFound,
    		errFileVersionNotFound,
    		io.ErrUnexpectedEOF, // some times we would read without locks, ignore these errors
    		io.EOF,              // some times we would read without locks, ignore these errors
    	}
    	ignoredErrs = append(ignoredErrs, objectOpIgnoredErrs...)
    
    	errs := g.Wait()
    	for index, err := range errs {
    		if err == nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. internal/s3select/csv/reader.go

    	dst   chan [][]string // result of block decode
    	err   error           // any error encountered will be set here
    }
    
    // Read - reads single record.
    // Once Read is called the previous record should no longer be referenced.
    func (r *Reader) Read(dst sql.Record) (sql.Record, error) {
    	// If we have have any records left, return these before any error.
    	for len(r.current) <= r.recordsRead {
    		if r.err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  8. src/bytes/reader.go

    // The result is unaffected by any method calls except [Reader.Reset].
    func (r *Reader) Size() int64 { return int64(len(r.s)) }
    
    // Read implements the [io.Reader] interface.
    func (r *Reader) Read(b []byte) (n int, err error) {
    	if r.i >= int64(len(r.s)) {
    		return 0, io.EOF
    	}
    	r.prevRune = -1
    	n = copy(b, r.s[r.i:])
    	r.i += int64(n)
    	return
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  9. internal/s3select/select.go

    	}
    	return rsc.offset, nil
    }
    
    // Read call to implement io.Reader
    func (rsc *ObjectReadSeekCloser) Read(p []byte) (n int, err error) {
    	if rsc.reader == nil {
    		rsc.reader, err = rsc.segmentReader(rsc.offset)
    		if err != nil {
    			return 0, err
    		}
    	}
    	return rsc.reader.Read(p)
    }
    
    // Close call to implement io.Closer. Calling Read/Seek after Close reopens the
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Nov 06 22:26:08 GMT 2023
    - 21K bytes
    - Viewed (0)
  10. cmd/xl-storage-disk-id-check.go

    type diskHealthWrapper struct {
    	tracker *healthDiskCtxValue
    	r       io.Reader
    	w       io.Writer
    }
    
    func (d *diskHealthWrapper) Read(p []byte) (int, error) {
    	if d.r == nil {
    		return 0, fmt.Errorf("diskHealthWrapper: Read with no reader")
    	}
    	n, err := d.r.Read(p)
    	if err == nil || err == io.EOF && n > 0 {
    		d.tracker.logSuccess()
    	}
    	return n, err
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 32.7K bytes
    - Viewed (0)
Back to top