diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-06-11 23:13:33 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-06-11 23:13:33 -0700 |
| commit | 5bd72696ac1d602d67c5313e3a7b1848d290f712 (patch) | |
| tree | 13209e17bd989cfb90de00cad464ad7d7e47a669 /weed/filesys/dir.go | |
| parent | 98110c16970a1c231a5cc04e0eb85ec48d649e14 (diff) | |
| download | seaweedfs-5bd72696ac1d602d67c5313e3a7b1848d290f712.tar.xz seaweedfs-5bd72696ac1d602d67c5313e3a7b1848d290f712.zip | |
weed mount add ttl option
Diffstat (limited to 'weed/filesys/dir.go')
| -rw-r--r-- | weed/filesys/dir.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index b6379c7dc..b48226979 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -10,6 +10,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "path/filepath" "time" + "github.com/chrislusf/seaweedfs/weed/filer2" ) type Dir struct { @@ -110,11 +111,14 @@ func (dir *Dir) Create(ctx context.Context, req *fuse.CreateRequest, Name: req.Name, IsDirectory: req.Mode&os.ModeDir > 0, Attributes: &filer_pb.FuseAttributes{ - Mtime: time.Now().Unix(), - Crtime: time.Now().Unix(), - FileMode: uint32(req.Mode), - Uid: req.Uid, - Gid: req.Gid, + Mtime: time.Now().Unix(), + Crtime: time.Now().Unix(), + FileMode: uint32(req.Mode), + Uid: req.Uid, + Gid: req.Gid, + Collection: dir.wfs.collection, + Replication: dir.wfs.replication, + TtlSec: dir.wfs.ttlSec, }, }, } |
