mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 01:20:16 +02:00
mountlib: make Node satisfy os.FileInfo interface
This commit is contained in:
@@ -30,10 +30,9 @@ var _ fusefs.Node = (*File)(nil)
|
||||
// Attr fills out the attributes for the file
|
||||
func (f *File) Attr(ctx context.Context, a *fuse.Attr) (err error) {
|
||||
defer fs.Trace(f, "")("a=%+v, err=%v", a, &err)
|
||||
modTime, Size, Blocks, err := f.File.Attr(mountlib.NoModTime)
|
||||
if err != nil {
|
||||
return translateError(err)
|
||||
}
|
||||
modTime := f.File.ModTime()
|
||||
Size := uint64(f.File.Size())
|
||||
Blocks := (Size + 511) / 512
|
||||
a.Gid = mountlib.GID
|
||||
a.Uid = mountlib.UID
|
||||
a.Mode = mountlib.FilePerms
|
||||
|
Reference in New Issue
Block a user