struct
let file ~run_with path =
let open KEDSL in
workflow_node nothing
~name:(sprintf "rm-%s" (Filename.basename path))
~ensures:(`Is_verified (`Command_returns (
Command.shell ~host:Machine.(as_host run_with)
(sprintf "ls %s" path),
2)))
~make:(Machine.quick_run_program
run_with Program.(exec ["rm"; "-f"; path]))
~tags:[Target_tags.clean_up]
let directory ~run_with path =
let open KEDSL in
workflow_node nothing
~name:(sprintf "rmdir-%s" (Filename.basename path))
~ensures:(`Is_verified (`Command_returns (
Command.shell ~host:Machine.(as_host run_with)
(sprintf "ls %s" path),
2
)))
~make:(Machine.quick_run_program
run_with Program.(exec ["rm"; "-rf"; path]))
~tags:[Target_tags.clean_up]
let path_on_host ~host path =
let open KEDSL in
workflow_node nothing
~name:(sprintf "rm-%s" (Filename.basename path))
~make:(daemonize ~using:`Python_daemon ~host
Program.(exec ["rm"; "-rf"; path]))
end