> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Stat a file or directory

> Returns the metadata of a file or directory as headers, with no body. This checks stat availability, not permission to read file contents or list a directory. When the path does not exist or its metadata cannot be accessed, the response is an empty 200 without the X-File-Type header.



## OpenAPI

````yaml https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml head /filesystem/{path}
openapi: 3.0.0
info:
  contact: {}
  description: API for manipulating filesystem, processes and network.
  title: Sandbox API
  version: 0.0.1
servers:
  - url: https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run
    variables:
      sandbox_id:
        default: unknown
      workspace_id:
        default: unknown
      region:
        default: unknown
security:
  - BearerAuth: []
paths:
  /filesystem/{path}:
    head:
      tags:
        - filesystem
      summary: Stat a file or directory
      description: >-
        Returns the metadata of a file or directory as headers, with no body.
        This checks stat availability, not permission to read file contents or
        list a directory. When the path does not exist or its metadata cannot be
        accessed, the response is an empty 200 without the X-File-Type header.
      parameters:
        - description: File or directory path
          in: path
          name: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Path metadata (X-File-Type is set only when stat succeeds)
          headers:
            Content-Length:
              description: File size in bytes (files only)
              schema:
                type: integer
            Last-Modified:
              description: Modification time (HTTP date)
              schema:
                type: string
            X-File-Mode:
              description: >-
                Permission bits including sticky, setgid and setuid in octal
                (e.g., 644 or 1777)
              schema:
                type: string
            X-File-Type:
              description: file or directory
              schema:
                type: string
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.