// Paths returns all the specified-paths for the runner
Paths returns all the specified-paths for the runner
// Paths returns all the specified - paths for the runner
func (r *Runner) Paths() []string {
	var paths []string
	if r.CaseSettings != nil {
		paths = append(paths, r.CaseSettings.CaseLocation)
	}
	for _, stage := range r.Stages {
		if stage.Process != nil {
			paths = append(paths, stage.Process.ProfilePath)
			for _, evidence := range stage.Process.EvidenceStore {
				if len(evidence.Directory) != 0 {
					paths = append(paths, evidence.Directory)
				}
				for _, dir := range evidence.Directories {
					paths = append(paths, dir.Path)
				}
			}
		}
		if stage.SearchAndTag != nil {
			for _, file := range stage.SearchAndTag.Files {
				paths = append(paths, file.Path)
			}
		}
		if stage.Ocr != nil {
			paths = append(paths, stage.Ocr.ProfilePath)
		}
		if stage.Reload != nil {
			paths = append(paths, stage.Reload.ProfilePath)
		}
		if stage.InApp != nil {
			paths = append(paths, stage.InApp.Config)
		}
	}
	pathSwitches := []string{
		"-Dnuix.logdir=",
		"-java.io.tmpdir=",
		"-Dnuix.worker.tmpdir=",
		"-javaagent:",
		"-Dnuix.processing.sharedTempDirectory=",
		"-Dnuix.worker.jvm.arguments=-javaagent:",
	}
	if r.Switches != nil {
		for _, cmdSwitch := range r.Switches {
			for _, path := range pathSwitches {
				if strings.HasPrefix(cmdSwitch.Value, path) {
					paths = append(paths, strings.TrimPrefix(cmdSwitch.Value, path))
				}
			}
		}
	}
	return paths
}
func ( r * Runner ) Paths ( ) [ ] string { var paths [ ] string if r . CaseSettings != nil { paths = append ( paths , r . CaseSettings . CaseLocation ) } for _ , stage := range r . Stages { if stage . Process != nil { paths = append ( paths , stage . Process . ProfilePath ) for _ , evidence := range stage . Process . EvidenceStore { if len ( evidence . Directory ) != 0 { paths = append ( paths , evidence . Directory ) } for _ , dir := range evidence . Directories { paths = append ( paths , dir . Path ) } } } if stage . SearchAndTag != nil { for _ , file := range stage . SearchAndTag . Files { paths = append ( paths , file . Path ) } } if stage . Ocr != nil { paths = append ( paths , stage . Ocr . ProfilePath ) } if stage . Reload != nil { paths = append ( paths , stage . Reload . ProfilePath ) } if stage . InApp != nil { paths = append ( paths , stage . InApp . Config ) } } pathSwitches := [ ] string { " " , " " , " " , " " , " " , " " , } if r . Switches != nil { for _ , cmdSwitch := range r . Switches { for _ , path := range pathSwitches { if strings . HasPrefix ( cmdSwitch . Value , path ) { paths = append ( paths , strings . TrimPrefix ( cmdSwitch . Value , path ) ) } } } } return paths }
Paths returns all the specified-paths for the runner
Paths returns all the specified - paths for the runner