Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 404 for lseek (0.04 sec)

  1. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/btree/ByteInputTest.groovy

            input = new ByteInput(file)
        }
    
        def cleanup() {
            file.close()
        }
    
        def "can reuse to read from multiple locations in file"() {
            given:
            file.seek(0)
            file.writeInt(123)
            file.writeInt(321)
            file.writeInt(456)
    
            expect:
            def stream = input.start(0)
            stream.readInt() == 123
            stream.readInt() == 321
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build linux && gccgo && 386
    
    package unix
    
    import (
    	"syscall"
    	"unsafe"
    )
    
    func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
    	var newoffset int64
    	offsetLow := uint32(offset & 0xffffffff)
    	offsetHigh := uint32((offset >> 32) & 0xffffffff)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 986 bytes
    - Viewed (0)
  3. platforms/core-runtime/files/src/main/java/org/gradle/internal/file/RandomAccessFileInputStream.java

        private final RandomAccessFile file;
    
        public RandomAccessFileInputStream(RandomAccessFile file) {
            this.file = file;
        }
    
        @Override
        public long skip(long n) throws IOException {
            file.seek(file.getFilePointer() + n);
            return n;
        }
    
        @Override
        public int read(byte[] bytes) throws IOException {
            return file.read(bytes);
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  4. src/syscall/asm_plan9_386.s

    	MOVSL
    	MOVSL
    	INT	$64
    	MOVL	AX, r1+28(FP)
    	MOVL	AX, r2+32(FP)
    	MOVL	AX, err+36(FP)
    	RET
    
    #define SYS_SEEK 39	/* from zsysnum_plan9.go */
    
    //func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)
    TEXT ยทseek(SB),NOSPLIT,$24-36
    	NO_LOCAL_POINTERS
    	LEAL	newoffset+20(FP), AX
    	MOVL	AX, placeholder+0(FP)
    
    	// copy args down
    	LEAL	placeholder+0(FP), SI
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 03 15:28:51 UTC 2018
    - 3.1K bytes
    - Viewed (0)
  5. src/debug/dwarf/entry.go

    func (r *Reader) ByteOrder() binary.ByteOrder {
    	return r.b.order
    }
    
    // Seek positions the [Reader] at offset off in the encoded entry stream.
    // Offset 0 can be used to denote the first entry.
    func (r *Reader) Seek(off Offset) {
    	d := r.d
    	r.err = nil
    	r.lastChildren = false
    	if off == 0 {
    		if len(d.unit) == 0 {
    			return
    		}
    		u := &d.unit[0]
    		r.unit = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 30.7K bytes
    - Viewed (0)
  6. src/os/file_plan9.go

    			}
    		}
    	}
    
    	if e != nil {
    		return nil, &PathError{Op: "open", Path: name, Err: e}
    	}
    
    	if append {
    		if _, e = syscall.Seek(fd, 0, io.SeekEnd); e != nil {
    			return nil, &PathError{Op: "seek", Path: name, Err: e}
    		}
    	}
    
    	return NewFile(uintptr(fd), name), nil
    }
    
    func openDirNolog(name string) (*File, error) {
    	return openFileNolog(name, O_RDONLY, 0)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 15:35:30 UTC 2024
    - 16K bytes
    - Viewed (0)
  7. src/os/file.go

    	O_TRUNC  int = syscall.O_TRUNC  // truncate regular writable file when opened.
    )
    
    // Seek whence values.
    //
    // Deprecated: Use io.SeekStart, io.SeekCurrent, and io.SeekEnd.
    const (
    	SEEK_SET int = 0 // seek relative to the origin of the file
    	SEEK_CUR int = 1 // seek relative to the current offset
    	SEEK_END int = 2 // seek relative to the end
    )
    
    // LinkError records an error during a link or symlink or rename
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:37 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  8. cmd/dummy-data-generator_test.go

    		d.idx += int64(w)
    		n += w
    	}
    	if d.idx >= d.length {
    		extraBytes := d.idx - d.length
    		n -= int(extraBytes)
    		if n < 0 {
    			n = 0
    		}
    		err = io.EOF
    	}
    	return
    }
    
    func (d *DummyDataGen) Seek(offset int64, whence int) (int64, error) {
    	switch whence {
    	case io.SeekStart:
    		if offset < 0 {
    			return 0, errors.New("Invalid offset")
    		}
    		d.idx = offset
    	case io.SeekCurrent:
    		if d.idx+offset < 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  9. src/debug/plan9obj/file.go

    type Section struct {
    	SectionHeader
    
    	// 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 Plan 9 a.out section.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/plan9/syscall_plan9.go

    	return
    }
    
    // Underlying system call writes to newoffset via pointer.
    // Implemented in assembly to avoid allocation.
    func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)
    
    func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
    	newoffset, e := seek(0, fd, offset, whence)
    
    	if newoffset == -1 {
    		err = syscall.ErrorString(e)
    	}
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 16 22:24:28 UTC 2022
    - 7K bytes
    - Viewed (0)
Back to top