executeTimestomp copies file timestamps from source to destination
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 1276 | |
| 1277 | // executeTimestomp copies file timestamps from source to destination |
| 1278 | func (e *Executor) executeTimestomp(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
| 1279 | source, ok := action.Parameters["source"].(string) |
| 1280 | if !ok { |
| 1281 | return "", fmt.Errorf("source parameter required for timestomp") |
| 1282 | } |
| 1283 | destination, ok := action.Parameters["destination"].(string) |
| 1284 | if !ok { |
| 1285 | return "", fmt.Errorf("destination parameter required for timestomp") |
| 1286 | } |
| 1287 | |
| 1288 | resp, err := client.Timestomp(ctx, beaconID, source, destination) |
| 1289 | if err != nil { |
| 1290 | return "", err |
| 1291 | } |
| 1292 | |
| 1293 | return e.fireAndForget(resp.TaskID, "timestomp "+source+" "+destination) |
| 1294 | } |
| 1295 | |
| 1296 | // --- Process Management Handlers --- |
| 1297 |
no test coverage detected