Source file src/os/file_wasip1.go

     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 wasip1
     6  
     7  package os
     8  
     9  import "internal/poll"
    10  
    11  // PollFD returns the poll.FD of the file.
    12  //
    13  // Other packages in std that also import internal/poll (such as net)
    14  // can use a type assertion to access this extension method so that
    15  // they can pass the *poll.FD to functions like poll.Splice.
    16  //
    17  // There is an equivalent function in net.rawConn.
    18  //
    19  // PollFD is not intended for use outside the standard library.
    20  func (f *file) PollFD() *poll.FD {
    21  	return &f.pfd
    22  }
    23  

View as plain text