github.com/bananabytelabs/wazero@v0.0.0-20240105073314-54b22a776da8/internal/sysfs/file_unsupported.go (about)

     1  //go:build !unix && !windows
     2  
     3  package sysfs
     4  
     5  import (
     6  	"os"
     7  
     8  	"github.com/bananabytelabs/wazero/experimental/sys"
     9  )
    10  
    11  const (
    12  	nonBlockingFileReadSupported  = false
    13  	nonBlockingFileWriteSupported = false
    14  )
    15  
    16  func rmdir(path string) sys.Errno {
    17  	return sys.UnwrapOSError(os.Remove(path))
    18  }
    19  
    20  // readFd returns ENOSYS on unsupported platforms.
    21  func readFd(fd uintptr, buf []byte) (int, sys.Errno) {
    22  	return -1, sys.ENOSYS
    23  }
    24  
    25  // writeFd returns ENOSYS on unsupported platforms.
    26  func writeFd(fd uintptr, buf []byte) (int, sys.Errno) {
    27  	return -1, sys.ENOSYS
    28  }