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

# isfolder

Returns `true` if `path` is an existing folder inside Seliware's workspace folder, `false` otherwise.

```luau theme={null}
isfolder(path: string): boolean
```

`path` is workspace-relative. Non-existent paths and file paths both return `false` without raising an error.

## Parameters

| Parameter | Type     | Description        |
| --------- | -------- | ------------------ |
| `path`    | `string` | Location to check. |

## Returns

`boolean` - `true` only if `path` resolves to a folder. Returns `false` for files, malformed paths, and anything that doesn't exist.

## Example

<CodeGroup>
  ```luau Example 1 theme={null}
  <<<<<<< HEAD
  local exists = isfolder("scripts")
  =======
  -- isfolder(path: string): boolean
  >>>>>>> 50e30f53759b0538759af25c9b271514aa2c9290
  ```

  ```luau Example 2 theme={null}
  print(isfolder("data"))
  ```
</CodeGroup>

<Tip>
  Use this check to verify directory structures before writing files.
</Tip>
