---
title: "Get file/dir"
method: GET
path: "/boxes/{boxId}/fs/info"
tags: ["File System"]
---

# Get file/dir

`GET /boxes/{boxId}/fs/info`

Retrieves metadata for a specific file or directory inside a box

## Path parameters

- `boxId` string, required

## Query parameters

- `workingDir` string
- `path` string, required

## Response `200`

Get file/dir

- union
  - File — File system file representation
    - `type` 'file', required — File type indicator
    - `name` string, required — Name of the file
    - `path` string, required — Full path to the file in the box
    - `size` string, required — Size of the file
    - `mode` string, required — File metadata
    - `lastModified` string, date-time, required — Last modified time of the file
  - Dir — File system directory representation
    - `type` 'dir', required — Directory type indicator
    - `name` string, required — Name of the directory
    - `path` string, required — Full path to the directory in the box
    - `mode` string, required — Directory metadata
    - `lastModified` string, date-time, required — Last modified time of the directory

## Other responses

- `404` — File/dir not found

---

[API](https://skmtc.dev/babelcloud/apis/gbox-open-api.md) · [All operations](https://skmtc.dev/babelcloud/apis/gbox-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/babelcloud/gbox-open-api/revisions/d655577fa915/schema)
