---
title: "List files in a directory"
method: GET
path: "/fs/list_files"
---

# List files in a directory

`GET /fs/list_files`

## Query parameters

- `path` string, required

## Response `200`

Directory listing

- FileInfo[] — Array of file or directory information entries.
  - `name` string, required — Base name of the file or directory.
  - `path` string, required — Absolute path.
  - `size_bytes` integer, required — Size in bytes. 0 for directories.
  - `is_dir` boolean, required — Whether the path is a directory.
  - `mod_time` string, date-time, required — Last modification time.
  - `mode` string, required — File mode bits (e.g., "drwxr-xr-x" or "-rw-r--r--").

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2025-08-07** `a6916d846229` — 1 info
  - endpoint added
- **2025-06-27** `f980a92ab23f` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/kernel/apis/kernel-images-api/changes/fs/list_files/get.md)

---

[API](https://skmtc.dev/kernel/apis/kernel-images-api.md) · [All operations](https://skmtc.dev/kernel/apis/kernel-images-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kernel/kernel-images-api/revisions/7a641fa15a85/schema)
