MCPcopy Index your code
hub / github.com/ddev/ddev / dispatchImportFilesAction

Method dispatchImportFilesAction

pkg/ddevapp/apptypes.go:524–538  ·  view source on GitHub ↗

dispatchImportFilesAction executes the relevant import files workflow for each app type.

(uploadDir, importPath, extractPath string)

Source from the content-addressed store, hash-verified

522
523// dispatchImportFilesAction executes the relevant import files workflow for each app type.
524func (app *DdevApp) dispatchImportFilesAction(uploadDir, importPath, extractPath string) error {
525 if strings.TrimSpace(uploadDir) == "" {
526 return fmt.Errorf("upload_dirs is not set for this project (%s)", app.Type)
527 }
528
529 if appFuncs, ok := appTypeMatrix[app.Type]; ok {
530 // if a specific action is not defined, use a generic action
531 if appFuncs.importFilesAction == nil {
532 appFuncs.importFilesAction = genericImportFilesAction
533 }
534 return appFuncs.importFilesAction(app, uploadDir, importPath, extractPath)
535 }
536
537 return fmt.Errorf("this project type (%s) does not support import-files", app.Type)
538}
539
540// DefaultWorkingDirMap returns the app type's default working directory map.
541func (app *DdevApp) DefaultWorkingDirMap() map[string]string {

Callers 1

ImportFilesMethod · 0.95

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected