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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.svrunit.com/assertions/directory-exists.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
