(archiveType string, absSourcePath string, absArchivePath string)
| 89 | } |
| 90 | |
| 91 | func copyContentsToArchive(archiveType string, absSourcePath string, absArchivePath string) errors.Error { |
| 92 | var files []os.DirEntry |
| 93 | files, err := os.ReadDir(absSourcePath) |
| 94 | if err != nil { |
| 95 | return errors.Convert(err) |
| 96 | } |
| 97 | for _, desPath := range files { |
| 98 | archiveDest := desPath.Name() |
| 99 | src := fmt.Sprintf("%s/%s", absSourcePath, archiveDest) |
| 100 | err = copyToArchive(archiveType, src, absArchivePath, archiveDest) |
| 101 | if err != nil { |
| 102 | return errors.Convert(err) |
| 103 | } |
| 104 | } |
| 105 | return nil |
| 106 | } |
| 107 | |
| 108 | func copyToArchive(archiveType string, absSourcePath string, absArchivePath string, archiveDest string) errors.Error { |
| 109 | src := fmt.Sprintf("file://%s", absSourcePath) |
no test coverage detected