| 48 | } |
| 49 | |
| 50 | func populateAttributes(a *fuse.Attr, e fs.Entry) { |
| 51 | a.Mode = goModeToUnixMode(e.Mode()) |
| 52 | a.Size = uint64(e.Size()) //nolint:gosec |
| 53 | a.Mtime = uint64(e.ModTime().Unix()) //nolint:gosec |
| 54 | a.Ctime = a.Mtime |
| 55 | a.Atime = a.Mtime |
| 56 | a.Nlink = 1 |
| 57 | a.Uid = e.Owner().UserID |
| 58 | a.Gid = e.Owner().GroupID |
| 59 | a.Blocks = (a.Size + fakeBlockSize - 1) / fakeBlockSize |
| 60 | } |
| 61 | |
| 62 | func (n *fuseNode) Getattr(_ context.Context, _ gofusefs.FileHandle, a *fuse.AttrOut) syscall.Errno { |
| 63 | populateAttributes(&a.Attr, n.entry) |