---
title: "Get information about a file or directory"
method: GET
path: "/browsers/{id_or_name}/fs/file_info"
tags: ["Browser Filesystem"]
---

# Get information about a file or directory

`GET /browsers/{id_or_name}/fs/file_info`

## Request

- Base URL: `https://api.onkernel.com`
- URL: `https://api.onkernel.com/browsers/{id_or_name}/fs/file_info`
- Auth: HTTP bearer

## Path parameters

- `id_or_name` string, required

## Query parameters

- `path` string, required

## Response `200`

File information

- FileInfo
  - `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--").
  - `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.

## Other responses

- `400`: Bad Request – invalid input
- `403`: Forbidden – insufficient permissions or plan
- `404`: Resource not found
- `500`: Internal Server Error
- `default`: Error returned by the browser or its proxy

---

[API](https://skmtc.dev/onkernel/apis/kernel-api.md) - [All operations](https://skmtc.dev/onkernel/apis/kernel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/onkernel/apis/kernel-api/revisions/0f6cf4f58fe6?raw)
