---
title: "Gets the contents of a given directory in the file system."
method: GET
path: "/Environment/DirectoryContents"
tags: ["Environment"]
---

# Gets the contents of a given directory in the file system.

`GET /Environment/DirectoryContents`

## Query parameters

- `path` string, required — The path.
- `includeFiles` boolean — An optional filter to include or exclude files from the results. true/false.
- `includeDirectories` boolean — An optional filter to include or exclude folders from the results. true/false.

## Response `200`

Directory contents returned.

- FileSystemEntryInfo[]
  - `Name` string, nullable — Gets the name.
  - `Path` string, nullable — Gets the path.
  - `Type` 'File' | 'Directory' | 'NetworkComputer' | 'NetworkShare' — Enum FileSystemEntryType.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/jellyfin/apis/jellyfin-api.md) · [All operations](https://skmtc.net/jellyfin/apis/jellyfin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jellyfin/jellyfin-api/versions/eb6f75af7066/schema)
