Slide 27
Slide 27 text
࣮ྫ
func (n CommandFile) Open(flags uint32, ctx *fuse.Context) (nodefs.File, fuse.Status) {
if flags&fuse.O_ANYWRITE != 0 {
return nodefs.NewDevNullFile(), fuse.OK
}
p, err := n.ReadFile(ctx)
if err != nil {
return nil, fuse.EIO
}
return &nodefs.WithFlags{
File: nodefs.NewDataFile(p),
FuseFlags: fuse.FOPEN_DIRECT_IO,
}, fuse.OK
}
wJOPEFͷૢ࡞ΛJOUFSGBDFͱͯ͠ఆٛͯ͘͠ΕͯΔͷͰͦΕΛຬͨ͢