Source file src/internal/poll/fstatat_unix.go

     1  // Copyright 2026 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 || wasip1
     6  
     7  package poll
     8  
     9  import (
    10  	"internal/syscall/unix"
    11  	"syscall"
    12  )
    13  
    14  func (fd *FD) Fstatat(name string, s *syscall.Stat_t, flags int) error {
    15  	if err := fd.incref(); err != nil {
    16  		return err
    17  	}
    18  	defer fd.decref()
    19  	return ignoringEINTR(func() error {
    20  		return unix.Fstatat(fd.Sysfd, name, s, flags)
    21  	})
    22  }
    23  

View as plain text