SetStat implements vfs.FileDescriptionImpl.SetStat.
(ctx context.Context, opts vfs.SetStatOptions)
| 154 | |
| 155 | // SetStat implements vfs.FileDescriptionImpl.SetStat. |
| 156 | func (fd *fileDescription) SetStat(ctx context.Context, opts vfs.SetStatOptions) error { |
| 157 | fs := fd.filesystem() |
| 158 | creds := auth.CredentialsFromContext(ctx) |
| 159 | inode := fd.inode() |
| 160 | inode.attrMu.Lock() |
| 161 | defer inode.attrMu.Unlock() |
| 162 | if err := vfs.CheckSetStat(ctx, creds, &opts, inode.filemode(), auth.KUID(inode.uid.Load()), auth.KGID(inode.gid.Load())); err != nil { |
| 163 | return err |
| 164 | } |
| 165 | return inode.setAttr(ctx, fs, creds, opts, fhOptions{useFh: true, fh: fd.Fh}) |
| 166 | } |
| 167 | |
| 168 | // Sync implements vfs.FileDescriptionImpl.Sync. |
| 169 | func (fd *fileDescription) Sync(ctx context.Context) error { |
nothing calls this directly
no test coverage detected