Finish the mirror feature. Finish the prototype of zip compress.

This commit is contained in:
zicla
2019-04-28 22:18:42 +08:00
parent a4f28cca30
commit 6e0078e1d8
25 changed files with 800 additions and 128 deletions

View File

@ -3,7 +3,6 @@ package rest
import (
"fmt"
"github.com/eyebluecn/tank/code/core"
"github.com/eyebluecn/tank/code/tool/util"
)
@ -12,6 +11,8 @@ const (
MATTER_ROOT = "root"
//cache文件夹名称
MATTER_CACHE = "cache"
//压缩文件的临时目录
MATTER_ZIP = "zip"
//matter名称最大长度
MATTER_NAME_MAX_LENGTH = 200
//matter文件夹最大深度
@ -80,3 +81,11 @@ func GetUserCacheRootDir(username string) (rootDirPath string) {
return rootDirPath
}
//获取到用户压缩临时文件的根目录。
func GetUserZipRootDir(username string) (rootDirPath string) {
rootDirPath = fmt.Sprintf("%s/%s/%s", core.CONFIG.MatterPath(), username, MATTER_ZIP)
return rootDirPath
}