> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/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 /reference/sandbox-api/openapi.json head /filesystem/{path}
openapi: 3.0.0
info:
  description: API for manipulating filesystem, processes and network.
  title: Sandbox API
  contact: {}
  version: 0.0.1
servers:
  - url: https://{sandbox_host}
    description: >-
      Host from the sandbox's returned url, without the scheme or trailing
      slash.
    variables:
      sandbox_host:
        default: sandbox.example.com
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
          name: path
          in: 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
      description: Sandbox access token created through POST /v1/token.

````