github.com/gaukas/wazerofs@v0.1.0/sysfs/file_unsupported.go (about)

     1  //go:build !unix && !windows
     2  
     3  package sysfs
     4  
     5  import (
     6  	"os"
     7  
     8  	"github.com/tetratelabs/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  }