Skip to content
  • Auto
  • Light
  • Dark
Get Started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Delete

client.vals.files.delete(stringvalID, FileDeleteParams { path_, recursive, branch_id } params, RequestOptionsoptions?): void
delete/v2/vals/{val_id}/files

Deletes a file or a directory. To delete a directory and all of its children, use the recursive flag. To delete all files, pass in an empty path and the recursive flag.

ParametersExpand Collapse
valID: string
params: FileDeleteParams { path_, recursive, branch_id }
path_: string

Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an empty string to represent the root directory.

recursive: boolean

Whether to recursively act on all files in the project

branch_id?: string

The specified branch of the resource. Defaults to main if not provided.

formatuuid
import ValTown from "npm:@valtown/sdk";

const client = new ValTown();

await client.vals.files.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { path: 'path', recursive: true });
Returns Examples