github.com/gaukas/wazerofs@v0.1.0/memfs/dir.go (about)

     1  package memfs
     2  
     3  import (
     4  	wasys "github.com/tetratelabs/wazero/sys"
     5  
     6  	"github.com/tetratelabs/wazero/experimental/sys"
     7  
     8  	"github.com/blang/vfs/memfs"
     9  )
    10  
    11  type memoryFSDir struct {
    12  	fs   *memfs.MemFS
    13  	path string
    14  
    15  	sys.UnimplementedFile
    16  }
    17  
    18  func (f *memoryFSDir) IsDir() (bool, sys.Errno) {
    19  	return true, 0
    20  }
    21  
    22  func (f *memoryFSDir) Stat() (wasys.Stat_t, sys.Errno) {
    23  	return stat(f.fs, f.path)
    24  }