executeMkdir creates a directory
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 1198 | |
| 1199 | // executeMkdir creates a directory |
| 1200 | func (e *Executor) executeMkdir(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
| 1201 | folder, ok := action.Parameters["folder"].(string) |
| 1202 | if !ok { |
| 1203 | return "", fmt.Errorf("folder parameter required for mkdir") |
| 1204 | } |
| 1205 | |
| 1206 | resp, err := client.Mkdir(ctx, beaconID, folder) |
| 1207 | if err != nil { |
| 1208 | return "", err |
| 1209 | } |
| 1210 | |
| 1211 | return e.fireAndForget(resp.TaskID, "mkdir "+folder) |
| 1212 | } |
| 1213 | |
| 1214 | // executeCp copies a file |
| 1215 | func (e *Executor) executeCp(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
no test coverage detected