MCPcopy Create free account
hub / github.com/Xenov-X/csbot / executeTimestomp

Method executeTimestomp

workflow/executor.go:1278–1294  ·  view source on GitHub ↗

executeTimestomp copies file timestamps from source to destination

(ctx context.Context, client *csclient.Client, beaconID string, action Action)

Source from the content-addressed store, hash-verified

1276
1277// executeTimestomp copies file timestamps from source to destination
1278func (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

Callers 1

executeActionMethod · 0.95

Calls 1

fireAndForgetMethod · 0.95

Tested by

no test coverage detected