Delete Hosting File
delete_hosting_fileRemove a file or directory from Porkbun Secure Static Hosting. Supports recursive deletion of non-empty directories up to 2,000 items.
Instructions
Delete a file or directory at path in a domain's Secure Static Hosting space. Idempotent: a path that is already gone succeeds with alreadyAbsent: true, so there is no need to re-check before retrying. A directory that still has files fails with HOSTING_DIR_NOT_EMPTY and lists its contents; pass recursive: true to delete a directory with everything in it in one call (up to 2,000 items; the site root can never be deleted). To clear out a site, delete its top-level entries with recursive: true rather than file by file. Calls the Porkbun Hosting API (https://porkbun.com/llms/hosting).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to delete, e.g. `old/page.html` or `assets`. | |
| domain | Yes | Domain whose hosting file to delete. | |
| recursive | No | Delete a directory together with everything inside it. Default false. |