> ## 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.

# Stream file modification events in a directory

> Streams the path of modified files (one per line) in the given directory. Closes when the client disconnects.



## OpenAPI

````yaml https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /watch/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:
  /watch/filesystem/{path}:
    get:
      tags:
        - filesystem
      summary: Stream file modification events in a directory
      description: >-
        Streams the path of modified files (one per line) in the given
        directory. Closes when the client disconnects.
      parameters:
        - description: Ignore patterns (comma-separated)
          in: query
          name: ignore
          schema:
            type: string
        - description: Directory path to watch
          in: path
          name: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Stream of modified file paths, one per line
          content:
            text/plain:
              schema:
                type: string
        '400':
          description: Invalid path
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      properties:
        error:
          example: Error message
          type: string
      required:
        - error
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````