pass file attributes from filer to mount

This commit is contained in:
Chris Lu
2018-05-14 02:02:17 -07:00
parent 67401f1908
commit 58954bf46f
5 changed files with 68 additions and 26 deletions

View File

@@ -10,6 +10,13 @@ import (
type FileId string //file id in SeaweedFS
type FullPath string
func NewFullPath(dir, name string) FullPath {
if dir == "/" {
return FullPath(dir + name)
}
return FullPath(dir + "/" + name)
}
func (fp FullPath) DirAndName() (string, string) {
dir, name := filepath.Split(string(fp))
if dir == "/" {
@@ -35,7 +42,7 @@ type Attr struct {
}
func (attr Attr) IsDirectory() (bool) {
return attr.Mode & os.ModeDir > 0
return attr.Mode&os.ModeDir > 0
}
type Entry struct {