Declaw icon

Declaw

Run code securely in Firecracker microVM sandboxes — create sandboxes, execute commands, manage files

File → Delete

AI-generated

Summary

Deletes a file or directory at an absolute path inside a Declaw sandbox by sending a DELETE request to the sandbox files API.

Inputs

  • Sandbox ID (required) — ID of the target sandbox (e.g. sbx-a1b2c3d4). Inserted into the request URL /sandboxes/{id}/files.
  • File Path (required) — Absolute path of the file or directory inside the sandbox to delete (e.g. /home/user/output.txt). Sent as the path query string parameter.

Output shape

One output item per input item containing the JSON response returned by the Declaw API for the delete call.

The exact response fields aren't defined in the node source; they depend on the API. If 'Continue On Fail' is enabled, a failed item yields {error: message} instead of stopping the workflow. The node does not check beforehand that the path exists, and it does not document whether directories are deleted recursively.

Examples

Example 1: Clean up a temporary output file after reading it from a sandbox.

Resource: File, Operation: Delete, Sandbox ID: {{$json.sandbox_id}}, File Path: /home/user/output.txt

Example 2: Remove a scratch directory before running a new job in the same sandbox.

Resource: File, Operation: Delete, Sandbox ID: sbx-a1b2c3d4, File Path: /home/user/tmp

Links

Discussion