MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / buildHistoryMoveTargetPath

Function buildHistoryMoveTargetPath

agent/app/service/file.go:965–973  ·  view source on GitHub ↗
(dst, name, sourcePath string, sourceCount int)

Source from the content-addressed store, hash-verified

963}
964
965func buildHistoryMoveTargetPath(dst, name, sourcePath string, sourceCount int) string {
966 if strings.TrimSpace(dst) == "" {
967 return sourcePath
968 }
969 if strings.TrimSpace(name) != "" && sourceCount == 1 {
970 return filepath.Join(dst, name)
971 }
972 return filepath.Join(dst, filepath.Base(sourcePath))
973}
974
975func (f *FileService) FileDownload(d request.FileDownload) (string, error) {
976 for _, p := range d.Paths {

Callers 1

MvFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected