Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 404 for lseek (0.15 sec)

  1. docs/en/docs/tutorial/request-files.md

    * `write(data)`: Writes `data` (`str` or `bytes`) to the file.
    * `read(size)`: Reads `size` (`int`) bytes/characters of the file.
    * `seek(offset)`: Goes to the byte position `offset` (`int`) in the file.
        * E.g., `await myfile.seek(0)` would go to the start of the file.
        * This is especially useful if you run `await myfile.read()` once and then need to read the contents again.
    * `close()`: Closes the file.
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:02:19 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/request-files.md

    * `write(data)`: Записать данные `data` (`str` или `bytes`) в файл.
    * `read(size)`: Прочитать количество `size` (`int`) байт/символов из файла.
    * `seek(offset)`: Перейти к байту на позиции `offset` (`int`) в файле.
        * Наример, `await myfile.seek(0)` перейдет к началу файла.
        * Это особенно удобно, если вы один раз выполнили команду `await myfile.read()`, а затем вам нужно прочитать содержимое файла еще раз.
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:02:19 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  3. test/fixedbugs/issue15528.go

    	"reflect"
    	"unsafe"
    )
    
    type RWS struct{}
    
    func (x *RWS) Read(p []byte) (n int, err error)                   { return }
    func (x *RWS) Write(p []byte) (n int, err error)                  { return }
    func (x *RWS) Seek(offset int64, whence int) (n int64, err error) { return }
    func (x *RWS) String() string                                     { return "rws" }
    
    func makeRWS() io.ReadWriteSeeker { return &RWS{} }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 12 14:31:26 UTC 2016
    - 3.1K bytes
    - Viewed (0)
  4. src/os/file_unix.go

    	runtime.SetFinalizer(file, nil)
    	return err
    }
    
    // seek sets the offset for the next Read or Write on file to offset, interpreted
    // according to whence: 0 means relative to the origin of the file, 1 means
    // relative to the current offset, and 2 means relative to the end.
    // It returns the new offset and an error, if any.
    func (f *File) seek(offset int64, whence int) (ret int64, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:52:34 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  5. src/syscall/syscall_openbsd_libc.go

    	return syscall10X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0)
    }
    
    //sys	readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_read
    //sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_lseek
    //sys	getcwd(buf []byte) (n int, err error)
    //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 04 07:51:20 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/stmtlines_test.go

    	if err != nil {
    		t.Fatalf("go build: %v\n%s", err, out)
    	}
    
    	lines := map[Line]bool{}
    	dw, err := open(dir + "/test.exe")
    	must(err)
    	rdr := dw.Reader()
    	rdr.Seek(0)
    	for {
    		e, err := rdr.Next()
    		must(err)
    		if e == nil {
    			break
    		}
    		if e.Tag != dwarf.TagCompileUnit {
    			continue
    		}
    		pkgname, _ := e.Val(dwarf.AttrName).(string)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 03 17:05:14 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  7. src/os/writeto_linux_test.go

    	if _, err := f.Write(data); err != nil {
    		t.Fatalf("failed to create and feed the file: %v", err)
    	}
    	if err := f.Sync(); err != nil {
    		t.Fatalf("failed to save the file: %v", err)
    	}
    	if _, err := f.Seek(0, io.SeekStart); err != nil {
    		t.Fatalf("failed to rewind the file: %v", err)
    	}
    
    	return f, data
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. src/cmd/go/internal/cache/cache.go

    	// exist on disk for until Close is called (at the end of the process).
    	Get(ActionID) (Entry, error)
    
    	// Put adds an item to the cache.
    	//
    	// The seeker is only used to seek to the beginning. After a call to Put,
    	// the seek position is not guaranteed to be in any particular state.
    	//
    	// As a special case, if the ReadSeeker is of type noVerifyReadSeeker,
    	// the verification from GODEBUG=goverifycache=1 is skipped.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 14:19:39 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  9. docs/ko/docs/tutorial/request-files.md

    * `write(data)`: `data`(`str` 또는 `bytes`)를 파일에 작성합니다.
    * `read(size)`: 파일의 바이트 및 글자의 `size`(`int`)를 읽습니다.
    * `seek(offset)`: 파일 내 `offset`(`int`) 위치의 바이트로 이동합니다.
        * 예) `await myfile.seek(0)` 를 사용하면 파일의 시작부분으로 이동합니다.
        * `await myfile.read()` 를 사용한 후 내용을 다시 읽을 때 유용합니다.
    * `close()`: 파일을 닫습니다.
    
    상기 모든 메소드들이 `async` 메소드이기 때문에 “await”을 사용하여야 합니다.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:02:19 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. internal/config/policy/opa/config.go

    	type opaResult struct {
    		Result bool `json:"result"`
    	}
    
    	respBody := bytes.NewReader(opaRespBytes)
    
    	var result opaResult
    	if err = json.NewDecoder(respBody).Decode(&result); err != nil {
    		respBody.Seek(0, 0)
    		var resultAllow opaResultAllow
    		if err = json.NewDecoder(respBody).Decode(&resultAllow); err != nil {
    			return false, err
    		}
    		return resultAllow.Result.Allow, nil
    	}
    
    	return result.Result, nil
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top