diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-01-19 23:59:46 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-01-19 23:59:46 -0800 |
| commit | 1b0bfbaf59ba613ebae6b90021b2270b3ac34bc5 (patch) | |
| tree | e8b08130edd727e14b8e1608fdb7771aab0d5764 /weed/filer2/fullpath.go | |
| parent | 2f15e9346696d18032b9d2bfffe459635cb36171 (diff) | |
| download | seaweedfs-1b0bfbaf59ba613ebae6b90021b2270b3ac34bc5.tar.xz seaweedfs-1b0bfbaf59ba613ebae6b90021b2270b3ac34bc5.zip | |
refactoring
Diffstat (limited to 'weed/filer2/fullpath.go')
| -rw-r--r-- | weed/filer2/fullpath.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/filer2/fullpath.go b/weed/filer2/fullpath.go index 191e51cf3..133069f93 100644 --- a/weed/filer2/fullpath.go +++ b/weed/filer2/fullpath.go @@ -3,6 +3,8 @@ package filer2 import ( "path/filepath" "strings" + + "github.com/chrislusf/seaweedfs/weed/util" ) type FullPath string @@ -34,3 +36,7 @@ func (fp FullPath) Child(name string) FullPath { } return FullPath(dir + "/" + name) } + +func (fp FullPath) AsInode() uint64 { + return uint64(util.HashStringToLong(string(fp))) +} |
