Added channel reader

This commit is contained in:
Yannick Ulrich 2023-02-26 19:02:23 +00:00
parent d2dbcd8713
commit 4333b83ca2
1 changed files with 9 additions and 0 deletions

View File

@ -246,6 +246,15 @@ func (fh *bytesFileReadHandle) Read(ctx context.Context, dest []byte, off int64)
return fuse.ReadResultData(fh.content[off:end]), 0
}
type sensorFileReadHandle struct {
ch <-chan uint8
}
var _ = (fs.FileReader)((*sensorFileReadHandle)(nil))
func (fh *sensorFileReadHandle) Read(ctx context.Context, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) {
return nil, 0
}
type bytesFileWriteHandle struct {
content []byte
path string