(fileOp fileUtils.FileOp)
| 629 | } |
| 630 | |
| 631 | func loadDownloadTree(fileOp fileUtils.FileOp) []dto.CleanTree { |
| 632 | var treeData []dto.CleanTree |
| 633 | treeData = loadTreeWithCheck(treeData, path.Join(global.Dir.BaseDir, downloadPath, "app"), "download_app", fileOp) |
| 634 | treeData = loadTreeWithCheck(treeData, path.Join(global.Dir.BaseDir, downloadPath, "website"), "download_website", fileOp) |
| 635 | treeData = loadTreeWithCheck(treeData, path.Join(global.Dir.BaseDir, downloadPath, "database"), "download_database", fileOp) |
| 636 | |
| 637 | path5 := path.Join(global.Dir.BaseDir, downloadPath) |
| 638 | uploadTreeData := loadTreeWithAllFile(true, path5, "download", path5, fileOp) |
| 639 | treeData = append(treeData, uploadTreeData...) |
| 640 | |
| 641 | appTmpDownloadTree := loadAppTmpDownloadTree(fileOp) |
| 642 | if len(appTmpDownloadTree) > 0 { |
| 643 | parentTree := dto.CleanTree{ |
| 644 | ID: uuid.NewString(), |
| 645 | Label: "app_tmp_download", |
| 646 | IsCheck: true, |
| 647 | IsRecommend: true, |
| 648 | CanDelete: false, |
| 649 | Type: "app_tmp_download", |
| 650 | Name: "apps", |
| 651 | } |
| 652 | for _, child := range appTmpDownloadTree { |
| 653 | parentTree.Size += child.Size |
| 654 | } |
| 655 | parentTree.Children = appTmpDownloadTree |
| 656 | treeData = append(treeData, parentTree) |
| 657 | } |
| 658 | return treeData |
| 659 | } |
| 660 | |
| 661 | func loadLogTree(fileOp fileUtils.FileOp) []dto.CleanTree { |
| 662 | var treeData []dto.CleanTree |
no test coverage detected