diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-23 00:01:34 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-23 00:01:34 -0700 |
| commit | c0f0fdb3baeb6e9852c6876b23c1404b2c5e833d (patch) | |
| tree | b52ffd7ac51e5c0472f0d0e2a8f5b1338cbf270c /weed/filesys/file.go | |
| parent | fbca6b29bd48eeed54511a9b53b937597eee5d19 (diff) | |
| download | seaweedfs-c0f0fdb3baeb6e9852c6876b23c1404b2c5e833d.tar.xz seaweedfs-c0f0fdb3baeb6e9852c6876b23c1404b2c5e833d.zip | |
refactoring
Diffstat (limited to 'weed/filesys/file.go')
| -rw-r--r-- | weed/filesys/file.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go index adafc54d7..e740f2747 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -10,6 +10,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/filer2" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) @@ -36,8 +37,8 @@ type File struct { reader io.ReadSeeker } -func (file *File) fullpath() filer2.FullPath { - return filer2.NewFullPath(file.dir.Path, file.Name) +func (file *File) fullpath() util.FullPath { + return util.NewFullPath(file.dir.Path, file.Name) } func (file *File) Attr(ctx context.Context, attr *fuse.Attr) error { @@ -218,7 +219,7 @@ func (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error { func (file *File) Forget() { glog.V(3).Infof("Forget file %s/%s", file.dir.Path, file.Name) - file.wfs.forgetNode(filer2.NewFullPath(file.dir.Path, file.Name)) + file.wfs.forgetNode(util.NewFullPath(file.dir.Path, file.Name)) } |
