> ## 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.

# isfolder

> Returns whether a path resolved inside the workspace exists and is a directory.

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

  ## 参数

  <ParamField path={"path"} type={"string"} required>
    Path resolved inside the workspace after separator normalization and workspace-boundary checks. Invalid or outside-workspace paths error before a boolean is returned.
  </ParamField>

  ## 返回值

  <ResponseField name={"isFolder"} type={"boolean"}>
    True only when the resolved path exists and is a directory; files and missing paths return false.
  </ResponseField>

  ## 示例

  检查 workspace path 是否解析到已存在的 directory。

  ```lua theme={null}
  local folderPath = "examples"
  local filePath = "examples/config.json"

  makefolder(folderPath)
  writefile(filePath, "{}")

  print(isfolder(folderPath))
  print(isfolder(filePath))
  print(isfolder("examples/missing"))
  ```
</div>
