-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux.go
More file actions
37 lines (31 loc) · 808 Bytes
/
Copy pathlinux.go
File metadata and controls
37 lines (31 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2017 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
// +build linux
package loopback
import (
"context"
"os"
"syscall"
"time"
"bazil.org/fuse"
)
func fillAttrWithFileInfo(a *fuse.Attr, fi os.FileInfo) {
s := fi.Sys().(*syscall.Stat_t)
a.Valid = attrValidDuration
a.Inode = s.Ino
a.Size = uint64(s.Size)
a.Blocks = uint64(s.Blocks)
a.Atime = time.Unix(s.Atim.Unix())
a.Mtime = time.Unix(s.Mtim.Unix())
a.Ctime = time.Unix(s.Ctim.Unix())
a.Mode = fi.Mode()
a.Nlink = uint32(s.Nlink)
a.Uid = s.Uid
a.Gid = s.Gid
a.BlockSize = uint32(s.Blksize)
}
func (n *Node) setattrPlatformSpecific(ctx context.Context,
req *fuse.SetattrRequest, resp *fuse.SetattrResponse) (err error) {
return nil
}