---
title: "List Directory Contents"
method: POST
path: "/api/filesystem/list"
tags: ["filesystem"]
---

# List Directory Contents

`POST /api/filesystem/list`

## Request

- Base URL: `http://localhost:4242/your-computer-name`
- URL: `http://localhost:4242/your-computer-name/api/filesystem/list`
- Auth: none declared

Lists the contents of a directory with optional filtering.

## Request body

- ListDirectoryParams
  - `path` string, required: Directory path to list
  - `include_hidden` boolean: Whether to include hidden files/directories
  - `pattern` string, nullable: Glob pattern to filter results

## Response `200`

Successfully listed directory contents

- FileInfo[]
  - `name` string, required: File or directory name
  - `path` string, required: Full path to the file or directory
  - `type` string, required: Type of entry: 'file' or 'directory'
  - `size` integer, required: Size in bytes
  - `modified_time` string, date-time, required: Last modification time
  - `is_hidden` boolean, required: Whether the file/directory is hidden
  - `extension` string, nullable: File extension if applicable

## Other responses

- `400`: Not a directory
- `403`: Permission denied
- `404`: Directory not found
- `422`: Validation Error
- `500`: Internal server error

## Changes

- **2026-07-13** `5424450258fc`: 1 info
  - endpoint added
- **2025-01-13** `a2d864f3a8db`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/cuse-dev/apis/cuse-apps-api/changes/api/filesystem/list/post.md)

---

[API](https://skmtc.dev/cuse-dev/apis/cuse-apps-api.md) - [All operations](https://skmtc.dev/cuse-dev/apis/cuse-apps-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cuse-dev/apis/cuse-apps-api/revisions/5424450258fc?raw)
