// Open implements the fs.NodeOpener interface for SpecialReadFile. func (f *SpecialReadFile) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error) { data, _, err := f.read(ctx) if err != nil { return nil, err } resp.Flags |= fuse.OpenDirectIO return fs.DataHandle(data), nil }
func (dataHandleTest) Open(*fuse.OpenRequest, *fuse.OpenResponse, fs.Intr) (fs.Handle, fuse.Error) { return fs.DataHandle([]byte(hi)), nil }