Finish some move things.

This commit is contained in:
zicla
2019-04-10 00:26:32 +08:00
parent 5936f917b3
commit 7f7fba0425
5 changed files with 160 additions and 27 deletions

View File

@ -33,3 +33,15 @@ func (Matter) TableName() string {
func (this *Matter) AbsolutePath() string {
return GetUserFileRootDir(this.Username) + this.Path
}
//创建一个 ROOT 的matter主要用于统一化处理移动复制等内容。
func NewRootMatter(user *User) *Matter {
matter := &Matter{}
matter.Uuid = MATTER_ROOT
matter.UserUuid = user.Uuid
matter.Username = user.Username
matter.Dir = true
matter.Path = ""
return matter
}