Implement the propfind method in tank.

This commit is contained in:
zicla
2019-04-21 00:57:22 +08:00
parent 50c025bd09
commit 74ee6c1bba
4 changed files with 78 additions and 66 deletions

View File

@ -29,13 +29,11 @@ func (Matter) TableName() string {
return TABLE_PREFIX + "matter"
}
// 获取该Matter的绝对路径。path代表的是相对路径。
func (this *Matter) AbsolutePath() string {
return GetUserFileRootDir(this.Username) + this.Path
}
// 获取该Matter的MimeType
func (this *Matter) MimeType() string {
return GetMimeType(GetExtension(this.Name))
@ -50,6 +48,8 @@ func NewRootMatter(user *User) *Matter {
matter.Username = user.Username
matter.Dir = true
matter.Path = ""
matter.CreateTime = user.CreateTime
matter.UpdateTime = user.UpdateTime
return matter
}