> For the complete documentation index, see [llms.txt](https://docs.svrunit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.svrunit.com/assertions/directory-exists.md).

# Directory Exists

This assertion type helps you to verify if a certain directory exists.

## Existing

Provide a TRUE (1) as expected to check that the directory should exist.

```yaml
directory_exists:
    - name: "DocRoot exists"
      directory: "/var/www/html"
      expected: 1
```

## Not Existing

Provide a FALSE (0) as expected to check that the directory does not exist at all.

```yaml
directory_exists:
    - name: "DocRoot must not exist"
      directory: "/var/www/html/public"
      expected: 0
```
