From 4333b83ca25d5057e275861367bd14269996d2b7 Mon Sep 17 00:00:00 2001 From: Yannick Ulrich Date: Sun, 26 Feb 2023 19:02:23 +0000 Subject: [PATCH] Added channel reader --- fuse.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fuse.go b/fuse.go index c41177c..708e9b9 100644 --- a/fuse.go +++ b/fuse.go @@ -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