github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/poll/fd_unixjs.go (about)

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build unix || (js && wasm)
     6  
     7  package poll
     8  
     9  import "github.com/shogo82148/std/syscall"
    10  
    11  type SysFile struct {
    12  	// Writev cache.
    13  	iovecs *[]syscall.Iovec
    14  }
    15  
    16  // Fchdir wraps syscall.Fchdir.
    17  func (fd *FD) Fchdir() error
    18  
    19  // ReadDirent wraps syscall.ReadDirent.
    20  // We treat this like an ordinary system call rather than a call
    21  // that tries to fill the buffer.
    22  func (fd *FD) ReadDirent(buf []byte) (int, error)
    23  
    24  // Seek wraps syscall.Seek.
    25  func (fd *FD) Seek(offset int64, whence int) (int64, error)