Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 425 for readAt (0.11 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/io/io_test.go

    			}(&wg, tmpfile, value, off, at, step)
    		}
    		wg.Wait()
    
    		// Read one more byte to reach EOF
    		buf := make([]byte, contentSize+1)
    		readN, err := tmpfile.ReadAt(buf, off+at)
    		if err != EOF {
    			t.Fatalf("ReadAt failed: %v", err)
    		}
    		readContent := string(buf[:contentSize])
    		if writeN != int64(readN) || writeN != contentSize || readContent != content {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 22:04:41 UTC 2023
    - 18.9K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/arch/arm/armasm/plan9x.go

    			case LDRB_EQ, LDRSB_EQ:
    				if _, err := text.ReadAt(buf[:1], int64(addr)); err != nil {
    					break
    				}
    				args[1] = fmt.Sprintf("$%#x", buf[0])
    
    			case LDRH_EQ, LDRSH_EQ:
    				if _, err := text.ReadAt(buf[:2], int64(addr)); err != nil {
    					break
    				}
    				args[1] = fmt.Sprintf("$%#x", binary.LittleEndian.Uint16(buf))
    
    			case LDR_EQ:
    				if _, err := text.ReadAt(buf[:4], int64(addr)); err != nil {
    					break
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  5. src/cmd/link/internal/ld/decodesym.go

    		if sect != nil {
    			bits := ptrdata / int64(ctxt.Arch.PtrSize)
    			r := make([]byte, (bits+7)/8)
    			// ldshlibsyms avoids closing the ELF file so sect.ReadAt works.
    			// If we remove this read (and the ones in decodetypeGcprog), we
    			// can close the file.
    			_, err := sect.ReadAt(r, int64(addr-sect.Addr))
    			if err != nil {
    				log.Fatal(err)
    			}
    			return r
    		}
    		Exitf("cannot find gcmask for %s", ctxt.loader.SymName(s))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 16:25:18 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  6. 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)
  7. src/debug/pe/file.go

    			!read(&oh32.MajorOperatingSystemVersion) ||
    			!read(&oh32.MinorOperatingSystemVersion) ||
    			!read(&oh32.MajorImageVersion) ||
    			!read(&oh32.MinorImageVersion) ||
    			!read(&oh32.MajorSubsystemVersion) ||
    			!read(&oh32.MinorSubsystemVersion) ||
    			!read(&oh32.Win32VersionValue) ||
    			!read(&oh32.SizeOfImage) ||
    			!read(&oh32.SizeOfHeaders) ||
    			!read(&oh32.CheckSum) ||
    			!read(&oh32.Subsystem) ||
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.2K bytes
    - Viewed (0)
  8. src/internal/xcoff/file.go

    }
    
    type nobitsSectionReader struct{}
    
    func (*nobitsSectionReader) ReadAt(p []byte, off int64) (n int, err error) {
    	return 0, errors.New("unexpected read from section with uninitialized data")
    }
    
    // Data reads and returns the contents of the XCOFF section s.
    func (s *Section) Data() ([]byte, error) {
    	dat := make([]byte, s.sr.Size())
    	n, err := s.sr.ReadAt(dat, 0)
    	if n == len(dat) {
    		err = nil
    	}
    	return dat[:n], err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 12 14:42:29 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  9. 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)
  10. src/debug/macho/file.go

    type Segment struct {
    	LoadBytes
    	SegmentHeader
    
    	// Embed ReaderAt for ReadAt method.
    	// Do not embed SectionReader directly
    	// to avoid having Read and Seek.
    	// If a client wants Read and Seek it must use
    	// Open() to avoid fighting over the seek offset
    	// with other clients.
    	io.ReaderAt
    	sr *io.SectionReader
    }
    
    // Data reads and returns the contents of the segment.
    func (s *Segment) Data() ([]byte, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.9K bytes
    - Viewed (0)
Back to top