> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# delfolder

> 使用 recursive folder deletion 递归删除 workspace 内已存在的 folder。

<div className="real-function-page">
  ```lua theme={null}
  delfolder(path: string)
  ```

  ## 参数

  <ParamField path={"path"} type={"string"} required>
    经过 separator normalization 和 workspace-boundary checks 后在 workspace 内解析的 path。目标必须存在并且是 directory；不接受 files。
  </ParamField>

  ## 示例

  删除已存在的 workspace folder 及其内容。

  ```lua theme={null}
  local path = "examples/temporary"
  makefolder(path)
  writefile(path .. "/note.txt", "temporary")

  delfolder(path)
  print(isfolder(path))
  ```
</div>
