Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 127 for readAt (0.34 sec)

  1. src/io/io.go

    // ReadAt blocks until either all the data is available or an error occurs.
    // In this respect ReadAt is different from Read.
    //
    // If the n = len(p) bytes returned by ReadAt are at the end of the
    // input source, ReadAt may return either err == EOF or err == nil.
    //
    // If ReadAt is reading from an input source with a seek offset,
    // ReadAt should not affect nor be affected by the underlying
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:34:10 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/macho_combine_dwarf.go

    			err = machoUpdateLoadCommand(reader, linkseg, linkoffset, &linkEditDataCmd{}, "DataOff")
    		case LC_ENCRYPTION_INFO, LC_ENCRYPTION_INFO_64:
    			err = machoUpdateLoadCommand(reader, linkseg, linkoffset, &encryptionInfoCmd{}, "CryptOff")
    		case LC_UUID:
    			var u uuidCmd
    			err = reader.ReadAt(0, &u)
    			if err == nil {
    				copy(u.Uuid[:], uuidFromGoBuildId(*flagBuildid))
    				err = reader.WriteAt(0, &u)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modindex/read.go

    	}
    	return asString(s[n : n+int(v)])
    }
    
    // A reader reads sequential fields from a section of the index format.
    type reader struct {
    	d   *decoder
    	pos int
    }
    
    // readAt returns a reader starting at the given position in d.
    func (d *decoder) readAt(pos int) *reader {
    	return &reader{d, pos}
    }
    
    // int reads the next int.
    func (r *reader) int() int {
    	i := r.d.intAt(r.pos)
    	r.pos += 4
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  4. src/debug/elf/file.go

    	return nil
    }
    
    // NewFile creates a new [File] for accessing an ELF binary in an underlying reader.
    // The ELF binary is expected to start at position 0 in the ReaderAt.
    func NewFile(r io.ReaderAt) (*File, error) {
    	sr := io.NewSectionReader(r, 0, 1<<63-1)
    	// Read and decode ELF identifier
    	var ident [16]uint8
    	if _, err := r.ReadAt(ident[0:], 0); err != nil {
    		return nil, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 16:49:58 UTC 2024
    - 43.1K bytes
    - Viewed (0)
  5. src/os/file.go

    	return e.Err
    }
    
    // Read reads up to len(b) bytes from the File and stores them in b.
    // It returns the number of bytes read and any error encountered.
    // At end of file, Read returns 0, io.EOF.
    func (f *File) Read(b []byte) (n int, err error) {
    	if err := f.checkValid("read"); err != nil {
    		return 0, err
    	}
    	n, e := f.read(b)
    	return n, f.wrapErr("read", e)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:37 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  6. cmd/sftp-server-driver.go

    }
    
    func (f *sftpDriver) Fileread(r *sftp.Request) (ra io.ReaderAt, err error) {
    	// This is not timing the actual read operation, but the time it takes to prepare the reader.
    	stopFn := globalSftpMetrics.log(r, f.AccessKey())
    	defer stopFn(0, err)
    
    	flags := r.Pflags()
    	if !flags.Read {
    		// sanity check
    		return nil, os.ErrInvalid
    	}
    
    	bucket, object := path2BucketObject(r.Filepath)
    	if bucket == "" {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. src/debug/buildinfo/buildinfo.go

    		} else {
    			bo = binary.LittleEndian
    		}
    		var readPtr func([]byte) uint64
    		if ptrSize == 4 {
    			readPtr = func(b []byte) uint64 { return uint64(bo.Uint32(b)) }
    		} else if ptrSize == 8 {
    			readPtr = bo.Uint64
    		} else {
    			return "", "", errNotGoExe
    		}
    		vers = readString(x, ptrSize, readPtr, readPtr(data[16:]))
    		mod = readString(x, ptrSize, readPtr, readPtr(data[16+ptrSize:]))
    	}
    	if vers == "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  8. src/embed/embed.go

    	files  []file // the directory contents
    	offset int    // the read offset, an index into the files slice
    }
    
    func (d *openDir) Close() error               { return nil }
    func (d *openDir) Stat() (fs.FileInfo, error) { return d.f, nil }
    
    func (d *openDir) Read([]byte) (int, error) {
    	return 0, &fs.PathError{Op: "read", Path: d.f.name, Err: errors.New("is a directory")}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:42:51 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  9. src/testing/fstest/testfs.go

    	if err != nil {
    		t.errorf("%s: fs.ReadFile: %w", file, err)
    		return
    	}
    	t.checkFileRead(file, "ReadAll vs fs.ReadFile", data, data2)
    
    	// Use iotest.TestReader to check small reads, Seek, ReadAt.
    	f, err = t.fsys.Open(file)
    	if err != nil {
    		t.errorf("%s: second Open: %w", file, err)
    		return
    	}
    	defer f.Close()
    	if err := iotest.TestReader(f, data); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  10. src/cmd/go/internal/modfetch/cache.go

    	if err != nil {
    		return "", err
    	}
    	return sum, nil
    }
    
    var errNotCached = fmt.Errorf("not in cache")
    
    // readDiskStat reads a cached stat result from disk,
    // returning the name of the cache file and the result.
    // If the read fails, the caller can use
    // writeDiskStat(file, info) to write a new cache entry.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 24.7K bytes
    - Viewed (0)
Back to top