forked from Elara6331/itd
Implemented Getattr
This commit is contained in:
parent
2a8de96773
commit
74afbc7c20
10
fuse/main.go
10
fuse/main.go
@ -242,6 +242,16 @@ func (fh *bytesFileWriteHandle) Flush(ctx context.Context) (errno syscall.Errno)
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ = (fs.NodeGetattrer)((*ITNode)(nil))
|
||||||
|
func (bn *ITNode) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) syscall.Errno {
|
||||||
|
out.Ino = bn.Ino
|
||||||
|
out.Mtime = bn.self.modtime
|
||||||
|
out.Ctime = bn.self.modtime
|
||||||
|
out.Atime = bn.self.modtime
|
||||||
|
out.Size = uint64(bn.self.size)
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var _ = (fs.NodeSetattrer)((*ITNode)(nil))
|
var _ = (fs.NodeSetattrer)((*ITNode)(nil))
|
||||||
func (bn *ITNode) Setattr(ctx context.Context, fh fs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno {
|
func (bn *ITNode) Setattr(ctx context.Context, fh fs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno {
|
||||||
out.Size = 0;
|
out.Size = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user