fix fscache move

This commit is contained in:
Chris Lu
2020-03-25 22:19:19 -07:00
parent 5c5ddc740d
commit 2e4fadd10a
7 changed files with 265 additions and 54 deletions

View File

@@ -38,3 +38,11 @@ func (fp FullPath) Child(name string) FullPath {
func (fp FullPath) AsInode() uint64 {
return uint64(HashStringToLong(string(fp)))
}
// split, but skipping the root
func (fp FullPath) Split() []string {
if fp == "" || fp == "/"{
return []string{}
}
return strings.Split(string(fp)[1:], "/")
}